diff options
author | Rick Jones <rick.jones2@hp.com> | 2011-11-09 10:58:07 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-14 06:35:46 +0100 |
commit | 23020ab35364f2c91133b099c2b1f7458e29aa96 (patch) | |
tree | 838cf53bb3b1670f591d404db40b5fe22b8c52fb /drivers/net/ethernet/intel/e100.c | |
parent | fsl_pq_mdio: Clean up tbi address configuration (diff) | |
download | linux-23020ab35364f2c91133b099c2b1f7458e29aa96.tar.xz linux-23020ab35364f2c91133b099c2b1f7458e29aa96.zip |
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/intel/e100.c')
-rw-r--r-- | drivers/net/ethernet/intel/e100.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/ethernet/intel/e100.c b/drivers/net/ethernet/intel/e100.c index 5a2fdf7a00c8..46003278ffa0 100644 --- a/drivers/net/ethernet/intel/e100.c +++ b/drivers/net/ethernet/intel/e100.c @@ -2376,10 +2376,11 @@ static void e100_get_drvinfo(struct net_device *netdev, struct ethtool_drvinfo *info) { struct nic *nic = netdev_priv(netdev); - strcpy(info->driver, DRV_NAME); - strcpy(info->version, DRV_VERSION); - strcpy(info->fw_version, "N/A"); - strcpy(info->bus_info, pci_name(nic->pdev)); + strlcpy(info->driver, DRV_NAME, sizeof(info->driver)); + strlcpy(info->version, DRV_VERSION, sizeof(info->version)); + strlcpy(info->fw_version, "N/A", sizeof(info->fw_version)); + strlcpy(info->bus_info, pci_name(nic->pdev), + sizeof(info->bus_info)); } #define E100_PHY_REGS 0x1C |