--- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -1624,7 +1624,7 @@ static void __trace_find_cmdline(int pid map = savedcmd->map_pid_to_cmdline[pid]; if (map != NO_CMDLINE_MAP) - strcpy(comm, get_saved_cmdlines(map)); + strlcpy(comm, get_saved_cmdlines(map), TASK_COMM_LEN); else strcpy(comm, "<...>"); }