diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-08-06 09:06:56 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-10 00:45:31 -0400 |
commit | 082ba88a5e6b1425abed3fae4ad65e0e985ed081 (patch) | |
tree | 026f6d39f60769fbd77369fc45affb68f79d149e /drivers/net/atl1c | |
parent | 5d5ceb8bdde403529ad9849f300dc80b1884550f (diff) |
atlx: strncpy does not null terminate string
strlcpy() will always null terminate the string.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Jay Cliburn <jcliburn@gmail.com>
Cc: Chris Snook <csnook@redhat.com>
Cc: Jie Yang <jie.yang@atheros.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/atl1c')
-rw-r--r-- | drivers/net/atl1c/atl1c_ethtool.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/atl1c/atl1c_ethtool.c b/drivers/net/atl1c/atl1c_ethtool.c index 607007d75b6f..00d11b480af3 100644 --- a/drivers/net/atl1c/atl1c_ethtool.c +++ b/drivers/net/atl1c/atl1c_ethtool.c | |||
@@ -232,11 +232,11 @@ static void atl1c_get_drvinfo(struct net_device *netdev, | |||
232 | { | 232 | { |
233 | struct atl1c_adapter *adapter = netdev_priv(netdev); | 233 | struct atl1c_adapter *adapter = netdev_priv(netdev); |
234 | 234 | ||
235 | strncpy(drvinfo->driver, atl1c_driver_name, sizeof(drvinfo->driver)); | 235 | strlcpy(drvinfo->driver, atl1c_driver_name, sizeof(drvinfo->driver)); |
236 | strncpy(drvinfo->version, atl1c_driver_version, | 236 | strlcpy(drvinfo->version, atl1c_driver_version, |
237 | sizeof(drvinfo->version)); | 237 | sizeof(drvinfo->version)); |
238 | strncpy(drvinfo->fw_version, "N/A", sizeof(drvinfo->fw_version)); | 238 | strlcpy(drvinfo->fw_version, "N/A", sizeof(drvinfo->fw_version)); |
239 | strncpy(drvinfo->bus_info, pci_name(adapter->pdev), | 239 | strlcpy(drvinfo->bus_info, pci_name(adapter->pdev), |
240 | sizeof(drvinfo->bus_info)); | 240 | sizeof(drvinfo->bus_info)); |
241 | drvinfo->n_stats = 0; | 241 | drvinfo->n_stats = 0; |
242 | drvinfo->testinfo_len = 0; | 242 | drvinfo->testinfo_len = 0; |