diff options
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r-- | kernel/sysctl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 08637699a862..21343d110296 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -2135,9 +2135,12 @@ static int do_proc_douintvec_conv(bool *negp, unsigned long *lvalp, if (write) { if (*negp) return -EINVAL; + if (*lvalp > UINT_MAX) + return -EINVAL; *valp = *lvalp; } else { unsigned int val = *valp; + *negp = false; *lvalp = (unsigned long)val; } return 0; |