projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d134f1
)
team: use strlcpy with ethtool_drvinfo fields
author
Flavio Leitner
<
[email protected]
>
Sat, 5 Jan 2013 02:53:10 +0000
(
02:53
+0000)
committer
David S. Miller
<
[email protected]
>
Mon, 7 Jan 2013 05:12:25 +0000
(21:12 -0800)
The fields must be null-terminated.
Signed-off-by: Flavio Leitner <
[email protected]
>
Acked-by: Jiri Pirko <
[email protected]
>
Acked-by: Ben Hutchings <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/team/team.c
patch
|
blob
|
history
diff --git
a/drivers/net/team/team.c
b/drivers/net/team/team.c
index 250f8c1df72c7d3cad3e1573448d4785cd08cf61..70d5d6bdf583c3defdb6ca43080e69724cbcf289 100644
(file)
--- 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)
{
- str
ncpy(drvinfo->driver, DRV_NAME, 32
);
- str
ncpy(drvinfo->version, UTS_RELEASE, 32
);
+ str
lcpy(drvinfo->driver, DRV_NAME, sizeof(drvinfo->driver)
);
+ str
lcpy(drvinfo->version, UTS_RELEASE, sizeof(drvinfo->version)
);
}
static const struct ethtool_ops team_ethtool_ops = {