]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/net/rionet.c
ethtool: fix drvinfo strings set in drivers
[mirror_ubuntu-artful-kernel.git] / drivers / net / rionet.c
index d8b9b1e8ee0221479e35dd143f36cc7eb4030913..f433b594388e170b28b1aa57a92485625d897cb6 100644 (file)
@@ -410,10 +410,10 @@ static void rionet_get_drvinfo(struct net_device *ndev,
 {
        struct rionet_private *rnet = netdev_priv(ndev);
 
-       strcpy(info->driver, DRV_NAME);
-       strcpy(info->version, DRV_VERSION);
-       strcpy(info->fw_version, "n/a");
-       strcpy(info->bus_info, rnet->mport->name);
+       strlcpy(info->driver, DRV_NAME, sizeof(info->driver));
+       strlcpy(info->version, DRV_VERSION, sizeof(info->version));
+       strlcpy(info->fw_version, "n/a", sizeof(info->fw_version));
+       strlcpy(info->bus_info, rnet->mport->name, sizeof(info->bus_info));
 }
 
 static u32 rionet_get_msglevel(struct net_device *ndev)