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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20201111202447.1702bcc3@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Wed, 11 Nov 2020 20:24:47 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     netdev <netdev@...r.kernel.org>,
        Mirko Lindner <mlindner@...vell.com>,
        Stephen Hemminger <stephen@...workplumber.org>
Subject: Re: [PATCH net-next v2] drivers: net: sky2: Fix
 -Wstringop-truncation with W=1

On Tue, 10 Nov 2020 03:32:22 +0100 Andrew Lunn wrote:
> In function ‘strncpy’,
>     inlined from ‘sky2_name’ at drivers/net/ethernet/marvell/sky2.c:4903:3,
>     inlined from ‘sky2_probe’ at drivers/net/ethernet/marvell/sky2.c:5049:2:
> ./include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ specified bound 16 equals destination size [-Wstringop-truncation]
> 
> None of the device names are 16 characters long, so it was never an
> issue. But replace the strncpy with an snprintf() to prevent the
> theoretical overflow.
> 
> Suggested-by: Stephen Hemminger <stephen@...workplumber.org>
> Signed-off-by: Andrew Lunn <andrew@...n.ch>

Applied, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ