diff options
author | Bruce Allan <bruce.w.allan@intel.com> | 2011-01-18 23:20:59 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2011-02-11 11:34:28 -0500 |
commit | 79f5e840143703b258717aab12647018320f4a5f (patch) | |
tree | a1eab3adf497f4ce5fdf8252b4a5e3a03daca600 /drivers/net/e1000e/netdev.c | |
parent | 6431cbc25fa21635ee04eb0516ba6c51389fbfac (diff) |
e1000e: replace unbounded sprintf with snprintf
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/e1000e/netdev.c')
-rw-r--r-- | drivers/net/e1000e/netdev.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index 6025d5fb12a4..7cedfeb505b2 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c | |||
@@ -1843,7 +1843,9 @@ static int e1000_request_msix(struct e1000_adapter *adapter) | |||
1843 | int err = 0, vector = 0; | 1843 | int err = 0, vector = 0; |
1844 | 1844 | ||
1845 | if (strlen(netdev->name) < (IFNAMSIZ - 5)) | 1845 | if (strlen(netdev->name) < (IFNAMSIZ - 5)) |
1846 | sprintf(adapter->rx_ring->name, "%s-rx-0", netdev->name); | 1846 | snprintf(adapter->rx_ring->name, |
1847 | sizeof(adapter->rx_ring->name) - 1, | ||
1848 | "%s-rx-0", netdev->name); | ||
1847 | else | 1849 | else |
1848 | memcpy(adapter->rx_ring->name, netdev->name, IFNAMSIZ); | 1850 | memcpy(adapter->rx_ring->name, netdev->name, IFNAMSIZ); |
1849 | err = request_irq(adapter->msix_entries[vector].vector, | 1851 | err = request_irq(adapter->msix_entries[vector].vector, |
@@ -1856,7 +1858,9 @@ static int e1000_request_msix(struct e1000_adapter *adapter) | |||
1856 | vector++; | 1858 | vector++; |
1857 | 1859 | ||
1858 | if (strlen(netdev->name) < (IFNAMSIZ - 5)) | 1860 | if (strlen(netdev->name) < (IFNAMSIZ - 5)) |
1859 | sprintf(adapter->tx_ring->name, "%s-tx-0", netdev->name); | 1861 | snprintf(adapter->tx_ring->name, |
1862 | sizeof(adapter->tx_ring->name) - 1, | ||
1863 | "%s-tx-0", netdev->name); | ||
1860 | else | 1864 | else |
1861 | memcpy(adapter->tx_ring->name, netdev->name, IFNAMSIZ); | 1865 | memcpy(adapter->tx_ring->name, netdev->name, IFNAMSIZ); |
1862 | err = request_irq(adapter->msix_entries[vector].vector, | 1866 | err = request_irq(adapter->msix_entries[vector].vector, |