mirror of
https://github.com/torvalds/linux.git
synced 2026-01-12 00:42:35 +08:00
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>
This commit is contained in:
committed by
Masami Hiramatsu (Google)
parent
ceb5d8d367
commit
cbe1e1241a
@@ -215,7 +215,7 @@ void __trace_probe_log_err(int offset, int err_type)
|
||||
p = command;
|
||||
for (i = 0; i < trace_probe_log.argc; i++) {
|
||||
len = strlen(trace_probe_log.argv[i]);
|
||||
strcpy(p, trace_probe_log.argv[i]);
|
||||
memcpy(p, trace_probe_log.argv[i], len);
|
||||
p[len] = ' ';
|
||||
p += len + 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user