]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - net/bridge/br_device.c
ethtool: fix drvinfo strings set in drivers
[mirror_ubuntu-artful-kernel.git] / net / bridge / br_device.c
index 38974f70ec7bf3e7e7d4c65c06a25b8b4a33f0ca..e1bc090bc00acb160ead451894cf045b59ba386e 100644 (file)
@@ -184,10 +184,10 @@ static int br_set_mac_address(struct net_device *dev, void *p)
 
 static void br_getinfo(struct net_device *dev, struct ethtool_drvinfo *info)
 {
-       strcpy(info->driver, "bridge");
-       strcpy(info->version, BR_VERSION);
-       strcpy(info->fw_version, "N/A");
-       strcpy(info->bus_info, "N/A");
+       strlcpy(info->driver, "bridge", sizeof(info->driver));
+       strlcpy(info->version, BR_VERSION, sizeof(info->version));
+       strlcpy(info->fw_version, "N/A", sizeof(info->fw_version));
+       strlcpy(info->bus_info, "N/A", sizeof(info->bus_info));
 }
 
 static netdev_features_t br_fix_features(struct net_device *dev,