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: <ZL/zNmrewrVtp+0g@corigine.com>
Date: Tue, 25 Jul 2023 18:07:18 +0200
From: Simon Horman <simon.horman@...igine.com>
To: "Radu Pirea (NXP OSS)" <radu-nicolae.pirea@....nxp.com>
Cc: andrew@...n.ch, hkallweit1@...il.com, linux@...linux.org.uk,
	davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
	pabeni@...hat.com, richardcochran@...il.com, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, sebastian.tobuschat@....com
Subject: Re: [PATCH net-next v4 03/11] net: phy: nxp-c45-tja11xx: prepare the
 ground for TJA1120

On Mon, Jul 24, 2023 at 05:12:24PM +0300, Radu Pirea (NXP OSS) wrote:

...

>  static void nxp_c45_get_strings(struct phy_device *phydev, u8 *data)
>  {
> +	const struct nxp_c45_phy_data *phy_data = nxp_c45_get_data(phydev);
> +	size_t count = nxp_c45_get_sset_count(phydev);
> +	size_t idx;
>  	size_t i;
>  
> -	for (i = 0; i < ARRAY_SIZE(nxp_c45_hw_stats); i++) {
> +	for (i = 0; i < count; i++) {
> +		if (i < ARRAY_SIZE(common_hw_stats)) {
> +			strncpy(data + i * ETH_GSTRING_LEN,
> +				common_hw_stats[i].name, ETH_GSTRING_LEN);

Hi Radu,

Checkpatch suggests using strscpy() here.

Link: https://github.com/KSPP/linux/issues/90:0

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ