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:	Sat, 5 Jan 2013 14:11:17 +0000
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Flavio Leitner <fbl@...hat.com>
CC:	netdev <netdev@...r.kernel.org>, Jiri Pirko <jpirko@...hat.com>
Subject: Re: [PATCH net-next] team: use strlcpy with ethtool_drvinfo fields

On Sat, 2013-01-05 at 10:53 -0200, Flavio Leitner wrote:
> The fields must be null-terminated.
> 
> Signed-off-by: Flavio Leitner <fbl@...hat.com>

Acked-by: Ben Hutchings <bhutchings@...arflare.com>

> ---
>  drivers/net/team/team.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
> index 78c7d87..e27ac5c 100644
> --- a/drivers/net/team/team.c
> +++ b/drivers/net/team/team.c
> @@ -1747,8 +1747,8 @@ static const struct net_device_ops team_netdev_ops = {
>  static void team_ethtool_get_drvinfo(struct net_device *dev,
>  				     struct ethtool_drvinfo *drvinfo)
>  {
> -	strncpy(drvinfo->driver, DRV_NAME, 32);
> -	strncpy(drvinfo->version, UTS_RELEASE, 32);
> +	strlcpy(drvinfo->driver, DRV_NAME, sizeof(drvinfo->driver));
> +	strlcpy(drvinfo->version, UTS_RELEASE, sizeof(drvinfo->version));
>  }
>  
>  static const struct ethtool_ops team_ethtool_ops = {

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ