aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sis
diff options
context:
space:
mode:
authorRick Jones <rick.jones2@hp.com>2011-11-09 04:58:07 -0500
committerDavid S. Miller <davem@davemloft.net>2011-11-14 00:35:46 -0500
commit23020ab35364f2c91133b099c2b1f7458e29aa96 (patch)
tree838cf53bb3b1670f591d404db40b5fe22b8c52fb /drivers/net/ethernet/sis
parent952c5ca14eab113072716ae075c6fd184f011a89 (diff)
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/sis')
-rw-r--r--drivers/net/ethernet/sis/sis190.c7
-rw-r--r--drivers/net/ethernet/sis/sis900.c7
2 files changed, 8 insertions, 6 deletions
diff --git a/drivers/net/ethernet/sis/sis190.c b/drivers/net/ethernet/sis/sis190.c
index 1b4658c99391..220e98219a3b 100644
--- a/drivers/net/ethernet/sis/sis190.c
+++ b/drivers/net/ethernet/sis/sis190.c
@@ -1760,9 +1760,10 @@ static void sis190_get_drvinfo(struct net_device *dev,
1760{ 1760{
1761 struct sis190_private *tp = netdev_priv(dev); 1761 struct sis190_private *tp = netdev_priv(dev);
1762 1762
1763 strcpy(info->driver, DRV_NAME); 1763 strlcpy(info->driver, DRV_NAME, sizeof(info->driver));
1764 strcpy(info->version, DRV_VERSION); 1764 strlcpy(info->version, DRV_VERSION, sizeof(info->version));
1765 strcpy(info->bus_info, pci_name(tp->pci_dev)); 1765 strlcpy(info->bus_info, pci_name(tp->pci_dev),
1766 sizeof(info->bus_info));
1766} 1767}
1767 1768
1768static int sis190_get_regs_len(struct net_device *dev) 1769static int sis190_get_regs_len(struct net_device *dev)
diff --git a/drivers/net/ethernet/sis/sis900.c b/drivers/net/ethernet/sis/sis900.c
index a184abc5ef11..c8efc708c792 100644
--- a/drivers/net/ethernet/sis/sis900.c
+++ b/drivers/net/ethernet/sis/sis900.c
@@ -1991,9 +1991,10 @@ static void sis900_get_drvinfo(struct net_device *net_dev,
1991{ 1991{
1992 struct sis900_private *sis_priv = netdev_priv(net_dev); 1992 struct sis900_private *sis_priv = netdev_priv(net_dev);
1993 1993
1994 strcpy (info->driver, SIS900_MODULE_NAME); 1994 strlcpy(info->driver, SIS900_MODULE_NAME, sizeof(info->driver));
1995 strcpy (info->version, SIS900_DRV_VERSION); 1995 strlcpy(info->version, SIS900_DRV_VERSION, sizeof(info->version));
1996 strcpy (info->bus_info, pci_name(sis_priv->pci_dev)); 1996 strlcpy(info->bus_info, pci_name(sis_priv->pci_dev),
1997 sizeof(info->bus_info));
1997} 1998}
1998 1999
1999static u32 sis900_get_msglevel(struct net_device *net_dev) 2000static u32 sis900_get_msglevel(struct net_device *net_dev)