Commit 3066af58 authored by Flavio Leitner's avatar Flavio Leitner Committed by David S. Miller
Browse files

team: use strlcpy with ethtool_drvinfo fields

The fields must be null-terminated.

Signed-off-by: default avatarFlavio Leitner <>
Acked-by: default avatarJiri Pirko <>
Acked-by: default avatarBen Hutchings <>
Signed-off-by: default avatarDavid S. Miller <>
parent 5d134f1c
......@@ -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 = {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment