Commit 8790bb0c authored by Stéphane Eranian's avatar Stéphane Eranian Committed by Linus Torvalds

[PATCH] fix for buffer limit for long in sysctl.c

Fix a bug in do_proc_doulongvec_minmax() where the the string buffer was
too short to parse a 64-bit number expressed in decimal.  That was causing
problems with entries in /proc/sys using long and allowing large number
(such as -1)
Signed-off-by: default avatarStephane Eranian <eranian@hpl.hp.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b6288c0e
......@@ -1436,7 +1436,7 @@ static int do_proc_dointvec(ctl_table *table, int write, struct file *filp,
int write, void *data),
void *data)
{
#define TMPBUFLEN 20
#define TMPBUFLEN 21
int *i, vleft, first=1, neg, val;
unsigned long lval;
size_t left, len;
......@@ -1676,7 +1676,7 @@ static int do_proc_doulongvec_minmax(ctl_table *table, int write,
unsigned long convmul,
unsigned long convdiv)
{
#define TMPBUFLEN 20
#define TMPBUFLEN 21
unsigned long *i, *min, *max, val;
int vleft, first=1, neg;
size_t len, left;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment