mirror of
https://github.com/torvalds/linux.git
synced 2026-03-14 00:56:20 +01:00
fgraph: Make pid_str size match the comment
The comment above buffer mentions sign, 10 bytes width for number and null terminator, but buffer itself isn't large enough to hold that much data. This is a cosmetic change, since PID cannot be negative, other than -1. Found by Linux Verification Center (linuxtesting.org) with SVACE. Link: https://lore.kernel.org/20250617152110.2530-1-a.sadovnikov@ispras.ru Signed-off-by: Artem Sadovnikov <a.sadovnikov@ispras.ru> Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
This commit is contained in:
parent
d7b8f8e208
commit
437889b926
1 changed files with 1 additions and 1 deletions
|
|
@ -513,7 +513,7 @@ static void print_graph_proc(struct trace_seq *s, pid_t pid)
|
|||
{
|
||||
char comm[TASK_COMM_LEN];
|
||||
/* sign + log10(MAX_INT) + '\0' */
|
||||
char pid_str[11];
|
||||
char pid_str[12];
|
||||
int spaces = 0;
|
||||
int len;
|
||||
int i;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue