summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/amd/amd8111e.c
diff options
context:
space:
mode:
authorRick Jones <rick.jones2@hp.com>2011-11-09 13:58:07 +0400
committerDavid S. Miller <davem@davemloft.net>2011-11-14 09:35:46 +0400
commit23020ab35364f2c91133b099c2b1f7458e29aa96 (patch)
tree838cf53bb3b1670f591d404db40b5fe22b8c52fb /drivers/net/ethernet/amd/amd8111e.c
parent952c5ca14eab113072716ae075c6fd184f011a89 (diff)
downloadlinux-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/amd/amd8111e.c')
-rw-r--r--drivers/net/ethernet/amd/amd8111e.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/ethernet/amd/amd8111e.c b/drivers/net/ethernet/amd/amd8111e.c
index a9745f4ddbfe..a388118ee8e6 100644
--- a/drivers/net/ethernet/amd/amd8111e.c
+++ b/drivers/net/ethernet/amd/amd8111e.c
@@ -1412,10 +1412,11 @@ static void amd8111e_get_drvinfo(struct net_device* dev, struct ethtool_drvinfo
{
struct amd8111e_priv *lp = netdev_priv(dev);
struct pci_dev *pci_dev = lp->pci_dev;
- strcpy (info->driver, MODULE_NAME);
- strcpy (info->version, MODULE_VERS);
- sprintf(info->fw_version,"%u",chip_version);
- strcpy (info->bus_info, pci_name(pci_dev));
+ strlcpy(info->driver, MODULE_NAME, sizeof(info->driver));
+ strlcpy(info->version, MODULE_VERS, sizeof(info->version));
+ snprintf(info->fw_version, sizeof(info->fw_version),
+ "%u", chip_version);
+ strlcpy(info->bus_info, pci_name(pci_dev), sizeof(info->bus_info));
}
static int amd8111e_get_regs_len(struct net_device *dev)