Skip to content

Commit

Permalink
[PATCH] PROC_NUMBUF is wrong
Browse files Browse the repository at this point in the history
Actually, the decimal representation of a 32-bit signed number can take 12
bytes, including the \0.

And then some code adds a \n as well, so let's give it 13 bytes.

Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Oct 17, 2006
1 parent ac08c26 commit 0187f87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/proc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@


/* Worst case buffer size needed for holding an integer. */
#define PROC_NUMBUF 10
#define PROC_NUMBUF 13

struct pid_entry {
int len;
Expand Down

0 comments on commit 0187f87

Please sign in to comment.