diff options
| author | Stéphane Eranian <eranian@hpl.hp.com> | 2004-07-28 09:03:00 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-07-28 09:03:00 -0700 |
| commit | 8790bb0c07d0f6bd64eb0dc2af136a361cb5bf30 (patch) | |
| tree | 66ec6b96366f7984f82de35287aa93ce4909a3f7 /kernel | |
| parent | b6288c0e1376b567fb5743402db2a71f57e86812 (diff) | |
[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 <eranian@hpl.hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/sysctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |
