ethtool: fix drvinfo strings set in drivers
[platform/adaptation/renesas_rcar/renesas_kernel.git] / drivers / net / ethernet / korina.c
index bc58f1d..5409fe8 100644 (file)
@@ -695,9 +695,9 @@ static void netdev_get_drvinfo(struct net_device *dev,
 {
        struct korina_private *lp = netdev_priv(dev);
 
-       strcpy(info->driver, DRV_NAME);
-       strcpy(info->version, DRV_VERSION);
-       strcpy(info->bus_info, lp->dev->name);
+       strlcpy(info->driver, DRV_NAME, sizeof(info->driver));
+       strlcpy(info->version, DRV_VERSION, sizeof(info->version));
+       strlcpy(info->bus_info, lp->dev->name, sizeof(info->bus_info));
 }
 
 static int netdev_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)