diff options
author | Rick Jones <rick.jones2@hp.com> | 2011-11-09 13:58:07 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-14 09:35:46 +0400 |
commit | 23020ab35364f2c91133b099c2b1f7458e29aa96 (patch) | |
tree | 838cf53bb3b1670f591d404db40b5fe22b8c52fb /drivers/net/ethernet/micrel | |
parent | 952c5ca14eab113072716ae075c6fd184f011a89 (diff) | |
download | linux-23020ab35364f2c91133b099c2b1f7458e29aa96.tar.xz |
Sweep additional floors of strcpy in .get_drvinfo routines
Perform another round of floor sweeping, converting the .get_drvinfo
routines of additional drivers from strcpy to strlcpy along with
some conversion of sprintf to snprintf.
Signed-off-by: Rick Jones <rick.jones2@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/micrel')
-rw-r--r-- | drivers/net/ethernet/micrel/ksz884x.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/ethernet/micrel/ksz884x.c b/drivers/net/ethernet/micrel/ksz884x.c index 7ece990381c8..3b67fe65404a 100644 --- a/drivers/net/ethernet/micrel/ksz884x.c +++ b/drivers/net/ethernet/micrel/ksz884x.c @@ -6093,9 +6093,10 @@ static void netdev_get_drvinfo(struct net_device *dev, struct dev_priv *priv = netdev_priv(dev); struct dev_info *hw_priv = priv->adapter; - strcpy(info->driver, DRV_NAME); - strcpy(info->version, DRV_VERSION); - strcpy(info->bus_info, pci_name(hw_priv->pdev)); + strlcpy(info->driver, DRV_NAME, sizeof(info->driver)); + strlcpy(info->version, DRV_VERSION, sizeof(info->version)); + strlcpy(info->bus_info, pci_name(hw_priv->pdev), + sizeof(info->bus_info)); } /** |