Sweep additional floors of strcpy in .get_drvinfo routines
authorRick Jones <rick.jones2@hp.com>
Wed, 9 Nov 2011 09:58:07 +0000 (09:58 +0000)
committerGuo-Fu Tseng <cooldavid@cooldavid.org>
Wed, 22 Feb 2012 18:17:37 +0000 (02:17 +0800)
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>
jme.c

diff --git a/jme.c b/jme.c
index 7a0c746..4e51946 100644 (file)
--- a/jme.c
+++ b/jme.c
@@ -2292,9 +2292,9 @@ jme_get_drvinfo(struct net_device *netdev,
 {
        struct jme_adapter *jme = netdev_priv(netdev);
 
-       strcpy(info->driver, DRV_NAME);
-       strcpy(info->version, DRV_VERSION);
-       strcpy(info->bus_info, pci_name(jme->pdev));
+       strlcpy(info->driver, DRV_NAME, sizeof(info->driver));
+       strlcpy(info->version, DRV_VERSION, sizeof(info->version));
+       strlcpy(info->bus_info, pci_name(jme->pdev), sizeof(info->bus_info));
 }
 
 static int