summaryrefslogtreecommitdiff
path: root/drivers/net/team
diff options
context:
space:
mode:
authorFlavio Leitner <fbl@redhat.com>2013-01-05 02:53:10 +0000
committerDavid S. Miller <davem@davemloft.net>2013-01-06 21:12:25 -0800
commit3066af582fd8084d9767ee8a71b8778360813106 (patch)
tree0db92f7b0fb15a548ec5813addc0b8e8caeacae7 /drivers/net/team
parent5d134f1c1f36166e8a738de92c4d2f4c262ff91b (diff)
downloadlinux-3.10-3066af582fd8084d9767ee8a71b8778360813106.tar.gz
linux-3.10-3066af582fd8084d9767ee8a71b8778360813106.tar.bz2
linux-3.10-3066af582fd8084d9767ee8a71b8778360813106.zip
team: use strlcpy with ethtool_drvinfo fields
The fields must be null-terminated. Signed-off-by: Flavio Leitner <fbl@redhat.com> Acked-by: Jiri Pirko <jiri@resnulli.us> Acked-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/team')
-rw-r--r--drivers/net/team/team.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 250f8c1df72..70d5d6bdf58 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 = {