summaryrefslogtreecommitdiff
path: root/drivers/net/atl1c
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-08-06 13:06:56 +0000
committerDavid S. Miller <davem@davemloft.net>2009-08-09 21:45:31 -0700
commit082ba88a5e6b1425abed3fae4ad65e0e985ed081 (patch)
tree026f6d39f60769fbd77369fc45affb68f79d149e /drivers/net/atl1c
parent5d5ceb8bdde403529ad9849f300dc80b1884550f (diff)
downloadlinux-rt-082ba88a5e6b1425abed3fae4ad65e0e985ed081.tar.gz
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.c8
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,
{
struct atl1c_adapter *adapter = netdev_priv(netdev);
- strncpy(drvinfo->driver, atl1c_driver_name, sizeof(drvinfo->driver));
- strncpy(drvinfo->version, atl1c_driver_version,
+ strlcpy(drvinfo->driver, atl1c_driver_name, sizeof(drvinfo->driver));
+ strlcpy(drvinfo->version, atl1c_driver_version,
sizeof(drvinfo->version));
- strncpy(drvinfo->fw_version, "N/A", sizeof(drvinfo->fw_version));
- strncpy(drvinfo->bus_info, pci_name(adapter->pdev),
+ strlcpy(drvinfo->fw_version, "N/A", sizeof(drvinfo->fw_version));
+ strlcpy(drvinfo->bus_info, pci_name(adapter->pdev),
sizeof(drvinfo->bus_info));
drvinfo->n_stats = 0;
drvinfo->testinfo_len = 0;