lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170821115036.mg2v7wfl565kksht@mwanda>
Date:   Mon, 21 Aug 2017 14:50:37 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Ilya Matveychikov <matvejchikov@...il.com>
Cc:     Baoquan He <bhe@...hat.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org, ben.hutchings@...ethink.co.uk
Subject: Re: [PATCH] lib/cmdline.c: add to the get_options() documentation

On Mon, Aug 21, 2017 at 02:42:52PM +0400, Ilya Matveychikov wrote:
> 
> > On Aug 21, 2017, at 1:46 PM, Dan Carpenter <dan.carpenter@...cle.com> wrote:
> > 
> > I wasn't sure how get_options() worked, so I looked at examples.  And by
> > sheer chance the first example I picked the only example which uses it
> > incorrectly...  I've added some comments that hopefully help.
> > 
> 
> See also comments on my patch from Ben Hutchings:
> https://patchwork.kernel.org/patch/9811617/

Ugh...  The implementation of get_options() looks gnarly, yes.  That
affects the part of my comment which says:

+ *     string.  It stores the number of numbers as the first element in the
+ *     array.

If we are going to keep the current behavior then we should specify that
ints[0] can be higher than "nints - 1".  But I feel like the current
behavior is wrong and that get_range() should never return more than n.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ