aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tun.c
diff options
context:
space:
mode:
authorRick Jones <rick.jones2@hp.com>2011-11-15 09:59:53 -0500
committerDavid S. Miller <davem@davemloft.net>2011-11-16 17:38:55 -0500
commit33a5ba144e3e7ffc1cd4a1d205e99c16078885bf (patch)
tree00bd6240afd42ef5a7daf422a8d4acd46118b873 /drivers/net/tun.c
parent588f033075d8c7efe28695402114eab3f9da47c4 (diff)
net: sweep-up some straglers in strlcpy conversion of .get_drvinfo routines
Convert some remaining straglers' .get_drvinfo routines to use strlcpy rather than strcpy/strncpy. Signed-off-by: Rick Jones <rick.jones2@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tun.c')
-rw-r--r--drivers/net/tun.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 7bea9c65119e..8592523b0bb5 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -1589,16 +1589,16 @@ static void tun_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info
1589{ 1589{
1590 struct tun_struct *tun = netdev_priv(dev); 1590 struct tun_struct *tun = netdev_priv(dev);
1591 1591
1592 strcpy(info->driver, DRV_NAME); 1592 strlcpy(info->driver, DRV_NAME, sizeof(info->driver));
1593 strcpy(info->version, DRV_VERSION); 1593 strlcpy(info->version, DRV_VERSION, sizeof(info->version));
1594 strcpy(info->fw_version, "N/A"); 1594 strlcpy(info->fw_version, "N/A", sizeof(info->fw_version));
1595 1595
1596 switch (tun->flags & TUN_TYPE_MASK) { 1596 switch (tun->flags & TUN_TYPE_MASK) {
1597 case TUN_TUN_DEV: 1597 case TUN_TUN_DEV:
1598 strcpy(info->bus_info, "tun"); 1598 strlcpy(info->bus_info, "tun", sizeof(info->bus_info));
1599 break; 1599 break;
1600 case TUN_TAP_DEV: 1600 case TUN_TAP_DEV:
1601 strcpy(info->bus_info, "tap"); 1601 strlcpy(info->bus_info, "tap", sizeof(info->bus_info));
1602 break; 1602 break;
1603 } 1603 }
1604} 1604}