diff options
| author | Siddarth G <[email protected]> | 2025-03-25 18:12:32 +0000 |
|---|---|---|
| committer | Steven Rostedt (Google) <[email protected]> | 2025-03-25 21:44:32 +0000 |
| commit | e0344f9564f5847dc20e245fbea67a4b262ee659 (patch) | |
| tree | 5159474873510e17947b157e0a485c03f2ecd1b9 /tools/perf/util/scripting-engines/trace-event-python.c | |
| parent | tracing: Fix synth event printk format for str fields (diff) | |
| download | kernel-e0344f9564f5847dc20e245fbea67a4b262ee659.tar.gz kernel-e0344f9564f5847dc20e245fbea67a4b262ee659.zip | |
tracing: Replace strncpy with memcpy for fixed-length substring copy
checkpatch.pl reports the following warning:
WARNING: Prefer strscpy, strscpy_pad, or __nonstring over strncpy
(see: https://github.com/KSPP/linux/issues/90)
In synth_field_string_size(), replace strncpy() with memcpy() to copy 'len'
characters from 'start' to 'buf'. The code manually adds a NUL terminator
after the copy, making memcpy safe here.
Link: https://lore.kernel.org/[email protected]
Signed-off-by: Siddarth G <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions
