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]
Date: Wed, 11 Oct 2023 01:13:54 +0300
From: Vladimir Oltean <olteanv@...il.com>
To: Justin Stitt <justinstitt@...gle.com>
Cc: Andrew Lunn <andrew@...n.ch>, Florian Fainelli <f.fainelli@...il.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-hardening@...r.kernel.org,
	Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [PATCH] net: dsa: vsc73xx: replace deprecated strncpy with
 ethtool_sprintf

On Tue, Oct 10, 2023 at 10:44:42AM -0700, Justin Stitt wrote:
> Wow, thanks for the feedback here. I agree that the current
> proposal is problematic. I wonder what you think about
> using a ternary to avoid smelly code dupe:
> 
> for (i = 0; i < 3; i++) {
>         cnt = vsc73xx_find_counter(vsc, indices[i], false);
>         ethtool_sprintf(&buf, "%s", cnt ? cnt->name : "");
> }

Looks like that would address my comment, and it looks okay.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ