ethtool: fix drvinfo strings set in drivers
[deliverable/linux.git] / drivers / net / ethernet / dec / ewrk3.c
index 9f992b95eddc1b13209082890f13d1d9a8248964..501517226f63f1d4b09df7bb24bb461b34b8456d 100644 (file)
@@ -1506,10 +1506,10 @@ static void ewrk3_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *in
 {
        int fwrev = Read_EEPROM(dev->base_addr, EEPROM_REVLVL);
 
-       strcpy(info->driver, DRV_NAME);
-       strcpy(info->version, DRV_VERSION);
-       sprintf(info->fw_version, "%d", fwrev);
-       strcpy(info->bus_info, "N/A");
+       strlcpy(info->driver, DRV_NAME, sizeof(info->driver));
+       strlcpy(info->version, DRV_VERSION, sizeof(info->version));
+       snprintf(info->fw_version, sizeof(info->fw_version), "%d", fwrev);
+       strlcpy(info->bus_info, "N/A", sizeof(info->bus_info));
        info->eedump_len = EEPROM_MAX;
 }
 
This page took 0.025543 seconds and 5 git commands to generate.