lkml.org 
[lkml]   [2008]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 2/6] autofs4 - remove string terminator check
    From
    Date

    This response is a bit confusing, let me try to fix that.

    On Tue, 2008-10-28 at 09:27 +0900, Ian Kent wrote:
    > On Mon, 2008-10-27 at 13:31 -0700, Andrew Morton wrote:
    > > On Thu, 23 Oct 2008 10:35:22 +0800
    > > Ian Kent <raven@themaw.net> wrote:
    > >
    > > > Remove unnecessary string terminator check.
    > >
    > > Why is it unnecessary?
    > >
    > > Does this change alter behaviour in any way?
    > >
    > > Does it fix a bug?
    >
    > Umm .... it was done in response to your comment, quoted below ...
    >
    <quote>
    > > +/*
    > > + * Check a string doesn't overrun the chunk of
    > > + * memory we copied from user land.
    > > + */
    > > +static int invalid_str(char *str, void *end)
    > > +{
    > > + while ((void *) str <= end)
    > > + if (!*str++)
    > > + return 0;
    > > + return -EINVAL;
    > > +}
    >
    > What is this? We copy strings in from userspace in 10000 different
    > places without needing checks such as this?
    </quote>




    \
     
     \ /
      Last update: 2008-10-28 02:05    [W:0.020 / U:90.948 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site