]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/net/ethernet/8390/3c503.c
ethtool: fix drvinfo strings set in drivers
[mirror_ubuntu-bionic-kernel.git] / drivers / net / ethernet / 8390 / 3c503.c
index 49d76bd0dc86fb12bc7a519fdc5a14d5a6eded82..0e9afe7b61a4e2f724b3e18383fde1b0bbda009d 100644 (file)
@@ -695,9 +695,10 @@ el2_block_input(struct net_device *dev, int count, struct sk_buff *skb, int ring
 static void netdev_get_drvinfo(struct net_device *dev,
                               struct ethtool_drvinfo *info)
 {
-       strcpy(info->driver, DRV_NAME);
-       strcpy(info->version, DRV_VERSION);
-       sprintf(info->bus_info, "ISA 0x%lx", dev->base_addr);
+       strlcpy(info->driver, DRV_NAME, sizeof(info->driver));
+       strlcpy(info->version, DRV_VERSION, sizeof(info->version));
+       snprintf(info->bus_info, sizeof(info->bus_info), "ISA 0x%lx",
+                dev->base_addr);
 }
 
 static const struct ethtool_ops netdev_ethtool_ops = {