Commit 73207746 authored by Devaansh Kumar's avatar Devaansh Kumar Committed by Steven Rostedt (Google)
Browse files

tracing: Replace deprecated strncpy() with strscpy() for stack_trace_filter_buf

strncpy() is deprecated for NUL-terminated destination buffers and must
be replaced by strscpy().

See issue: https://github.com/KSPP/linux/issues/90

Link: https://lore.kernel.org/20250507133837.19640-1-devaanshk840@gmail.com


Signed-off-by: default avatarDevaansh Kumar <devaanshk840@gmail.com>
Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
parent 6e3b3aca
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -542,7 +542,7 @@ static __init int enable_stacktrace(char *str)
	int len;

	if ((len = str_has_prefix(str, "_filter=")))
		strncpy(stack_trace_filter_buf, str + len, COMMAND_LINE_SIZE);
		strscpy(stack_trace_filter_buf, str + len);

	stack_tracer_enabled = 1;
	return 1;