Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tracing: probes: Replace strcpy() with memcpy() in __trace_probe_log_err()

strcpy() is deprecated; use memcpy() instead.

Link: https://lore.kernel.org/all/20250820214717.778243-3-thorsten.blum@linux.dev/

Link: https://github.com/KSPP/linux/issues/88
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>

authored by

Thorsten Blum and committed by
Masami Hiramatsu (Google)
cbe1e124 ceb5d8d3

+1 -1
+1 -1
kernel/trace/trace_probe.c
··· 215 215 p = command; 216 216 for (i = 0; i < trace_probe_log.argc; i++) { 217 217 len = strlen(trace_probe_log.argv[i]); 218 - strcpy(p, trace_probe_log.argv[i]); 218 + memcpy(p, trace_probe_log.argv[i], len); 219 219 p[len] = ' '; 220 220 p += len + 1; 221 221 }