From 8790bb0c07d0f6bd64eb0dc2af136a361cb5bf30 Mon Sep 17 00:00:00 2001 From: Stéphane Eranian Date: Wed, 28 Jul 2004 09:03:00 -0700 Subject: [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: Stephane Eranian Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- kernel/sysctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kernel') diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 0df0748d56bd..3ae9e7568738 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -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; -- cgit v1.2.3