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]
Message-ID: <Z9qovGEnv5Xg3xUC@smile.fi.intel.com>
Date: Wed, 19 Mar 2025 13:21:32 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: linux-usb@...r.kernel.org, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc: Andrew Lunn <andrew+netdev@...n.ch>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Heiner Kallweit <hkallweit1@...il.com>,
	Russell King <linux@...linux.org.uk>
Subject: Re: [PATCH net v2 1/2] net: phy: Fix formatting specifier to avoid
 potential string cuts

On Wed, Mar 19, 2025 at 12:54:33PM +0200, Andy Shevchenko wrote:
> The PHY_ID_FMT is defined with '%02x' which is _minumum_ digits
> to be printed. This, in particular, may trigger GCC warning, when
> the parameter for the above mentioned specifier is bigger than
> a byte. Avoid this, by limiting the amount of digits to be printed
> to two. This is okay as the PHY maximum address is 31 and it fits.

For the curious: additional reading in the commit
46d57a7a8e33 ("docs: printk-formats: Fix hex printing of signed values").

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ