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:
Thorsten Blum
2025-09-25 09:56:49 +09:00
committed by Masami Hiramatsu (Google)
parent ceb5d8d367
commit cbe1e1241a

View File

@@ -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;
}