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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 24 Aug 2021 10:43:23 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Michal Kubecek <mkubecek@...e.cz>
Cc:     andrew@...n.ch, netdev@...r.kernel.org, dcavalca@...com,
        filbranden@...com, michel@...com
Subject: Re: [PATCH ethtool 2/3] ethtool: use dummy args[] entry for no-args
 case

On Tue, 24 Aug 2021 19:41:23 +0200 Michal Kubecek wrote:
> On Fri, Aug 13, 2021 at 10:19:37AM -0700, Jakub Kicinski wrote:
> > Note that this patch adds a false-positive warning with GCC 11:
> > 
> > ethtool.c: In function ‘find_option’:
> > ethtool.c:6082:29: warning: offset ‘1’ outside bounds of constant string [-Warray-bounds]
> >  6082 |                         opt += len + 1;
> >       |                         ~~~~^~~~~~~~~~
> > 
> > we'll never get to that code if the string is empty.  
> 
> Unless I missed something, an easy workaround should be starting the
> loop in find_option() from 1 rather than from 0. It would IMHO even make
> more sense as there is little point comparing the first argument against
> the dummy args[0] entry.

SGTM, will you commit a patch or should I send one?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ