mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-20 19:44:56 +02:00
xt_quota2: remove trailing junk which might have a digit in it
Cherry-pick commit v2.3-6-gbc2bcc3. Signed-off-by: Sam Liddicott <sam@liddicott.com>
This commit is contained in:

committed by
Jan Engelhardt

parent
7fcbbe7dee
commit
a2d22c427f
@@ -69,6 +69,8 @@ static int quota_proc_write(struct file *file, const char __user *input,
|
||||
if (copy_from_user(buf, input, size) != 0)
|
||||
return -EFAULT;
|
||||
buf[sizeof(buf)-1] = '\0';
|
||||
if (size < sizeof(buf))
|
||||
buf[size] = '\0';
|
||||
|
||||
spin_lock_bh(&e->lock);
|
||||
e->quota = simple_strtoull(buf, NULL, 0);
|
||||
|
Reference in New Issue
Block a user