From 23020ab35364f2c91133b099c2b1f7458e29aa96 Mon Sep 17 00:00:00 2001 From: Rick Jones Date: Wed, 9 Nov 2011 09:58:07 +0000 Subject: 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 Signed-off-by: David S. Miller --- drivers/net/ethernet/sis/sis900.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/net/ethernet/sis/sis900.c') 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, { struct sis900_private *sis_priv = netdev_priv(net_dev); - strcpy (info->driver, SIS900_MODULE_NAME); - strcpy (info->version, SIS900_DRV_VERSION); - strcpy (info->bus_info, pci_name(sis_priv->pci_dev)); + strlcpy(info->driver, SIS900_MODULE_NAME, sizeof(info->driver)); + strlcpy(info->version, SIS900_DRV_VERSION, sizeof(info->version)); + strlcpy(info->bus_info, pci_name(sis_priv->pci_dev), + sizeof(info->bus_info)); } static u32 sis900_get_msglevel(struct net_device *net_dev) -- cgit v1.2.3-59-g8ed1b