]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/net/ethernet/amd/au1000_eth.c
ethtool: fix drvinfo strings set in drivers
[mirror_ubuntu-artful-kernel.git] / drivers / net / ethernet / amd / au1000_eth.c
index 2ea221ed4777f01527a81d08d299dcf44a3b6b8f..65b865a0cc78f2bb2e8ee0bb4d2103a08aa67b64 100644 (file)
@@ -587,10 +587,10 @@ au1000_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
 {
        struct au1000_private *aup = netdev_priv(dev);
 
-       strcpy(info->driver, DRV_NAME);
-       strcpy(info->version, DRV_VERSION);
-       info->fw_version[0] = '\0';
-       sprintf(info->bus_info, "%s %d", DRV_NAME, aup->mac_id);
+       strlcpy(info->driver, DRV_NAME, sizeof(info->driver));
+       strlcpy(info->version, DRV_VERSION, sizeof(info->version));
+       snprintf(info->bus_info, sizeof(info->bus_info), "%s %d", DRV_NAME,
+                aup->mac_id);
        info->regdump_len = 0;
 }