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: <1356992186.31299.1.camel@deadeye.wl.decadent.org.uk>
Date:	Mon, 31 Dec 2012 22:16:26 +0000
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Flavio Leitner <fbl@...hat.com>
CC:	netdev <netdev@...r.kernel.org>, Jiri Pirko <jiri@...nulli.us>
Subject: Re: [PATCH v2 net-next] team: add ethtool support

On Sun, 2012-12-30 at 00:37 -0200, Flavio Leitner wrote:
> This patch adds few ethtool operations to team driver.
> 
> Signed-off-by: Flavio Leitner <fbl@...hat.com>
> ---
> v2 - removed generic statistics from ethtool
> 
>  drivers/net/team/team.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
> index ad86660..7665a088 100644
> --- a/drivers/net/team/team.c
> +++ b/drivers/net/team/team.c
[...]
> +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);
> +}
[...]

These must be null-terminated, so use strlcpy() not strncpy().

Ben.

-- 
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