Re: [PATCH] fix count(), compat_count() bounds checking

From: Ollie Wild
Date: Fri Sep 19 2008 - 19:11:09 EST


On Fri, Sep 19, 2008 at 4:06 PM, Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> wrote:
>
> On Fri, 2008-09-19 at 11:50 -0400, Jason Baron wrote:
> >
> > Simple fix seems to be chaning ++i to i++ and checking for '>='.
>
> Right - looks sane enough, although in practise I'm not sure we'll ever
> care since I suspect we'll hit the target stack limit before this.
>
> Ollie?

Sounds reasonable to me. I'd also be ok with changing MAX_ARG_STRINGS
to 0x7FFFFFFE to help prevent people from making this mistake in the
future.

Ollie
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/