summaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_ethtool.c
diff options
context:
space:
mode:
authorDon Skidmore <donald.c.skidmore@intel.com>2010-12-03 09:33:54 +0000
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2010-12-10 22:12:58 -0800
commit9fe93afdd07aba52a018eb52784124579a80470e (patch)
tree064f2e4da3cb5eaa61a0378839e86d23c5a30905 /drivers/net/ixgbe/ixgbe_ethtool.c
parent5136cad37b276e3e11c4f8ad0bcf9cb2eec0e5af (diff)
downloadop-kernel-dev-9fe93afdd07aba52a018eb52784124579a80470e.zip
op-kernel-dev-9fe93afdd07aba52a018eb52784124579a80470e.tar.gz
ixgbe: cleanup string function calls to use bound checking versions.
Some minor cleanup to use string calls that use bound checks just to be extra safe. Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_ethtool.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_ethtool.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c
index f2245ac..23ff23e 100644
--- a/drivers/net/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ixgbe/ixgbe_ethtool.c
@@ -839,9 +839,10 @@ static void ixgbe_get_drvinfo(struct net_device *netdev,
struct ixgbe_adapter *adapter = netdev_priv(netdev);
char firmware_version[32];
- strncpy(drvinfo->driver, ixgbe_driver_name, sizeof(drvinfo->driver));
+ strncpy(drvinfo->driver, ixgbe_driver_name,
+ sizeof(drvinfo->driver) - 1);
strncpy(drvinfo->version, ixgbe_driver_version,
- sizeof(drvinfo->version));
+ sizeof(drvinfo->version) - 1);
snprintf(firmware_version, sizeof(firmware_version), "%d.%d-%d",
(adapter->eeprom_version & 0xF000) >> 12,
OpenPOWER on IntegriCloud