True, it doesn't fix all problems. I don't mind if you strip that part before applying. Sam On Thu, Jan 9, 2014 at 9:07 AM, Jan Engelhardt <jengelh@xxxxxxx> wrote: > > On Tuesday 2014-01-07 19:56, Sam Liddicott wrote: >>[0003] >>@@ -79,9 +80,35 @@ quota_proc_write(struct file *file, const char __user *input, >> if (size < sizeof(buf)) >> buf[size]=0; >> >>- spin_lock_bh(&e->lock); >>- e->quota = simple_strtoull(buf, NULL, 0); >>- spin_unlock_bh(&e->lock); >>+ while (isspace(*c)) >>+ c++; >>+ >>+ if (size - (c - buf) < 1) /* min string length */ >>+ return c - buf; > > Because @input is copied to @buf and that is size-limited, a string like > " +-123" > would be recognizd as -12 rather than -123. So, don't bother with > spaces at all. -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html