ethtool: fix drvinfo strings set in drivers
[deliverable/linux.git] / drivers / net / ethernet / nxp / lpc_eth.c
index 3466ca1e8f6c0c11edc26a06b86b83595ed014a0..6fda51ebcc765477bd0768c5829dadb0d73cd9e6 100644 (file)
@@ -1239,9 +1239,10 @@ static int lpc_eth_open(struct net_device *ndev)
 static void lpc_eth_ethtool_getdrvinfo(struct net_device *ndev,
        struct ethtool_drvinfo *info)
 {
-       strcpy(info->driver, MODNAME);
-       strcpy(info->version, DRV_VERSION);
-       strcpy(info->bus_info, dev_name(ndev->dev.parent));
+       strlcpy(info->driver, MODNAME, sizeof(info->driver));
+       strlcpy(info->version, DRV_VERSION, sizeof(info->version));
+       strlcpy(info->bus_info, dev_name(ndev->dev.parent),
+               sizeof(info->bus_info));
 }
 
 static u32 lpc_eth_ethtool_getmsglevel(struct net_device *ndev)
This page took 0.025361 seconds and 5 git commands to generate.