diff options
author | roel kluin <roel.kluin@gmail.com> | 2009-07-17 10:01:54 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-07-20 17:02:58 +0200 |
commit | 27e0955184a70c4bd4542ee2da18c749b4f43345 (patch) | |
tree | 34e2237c397d591ddb53eea5d421052ee617c1f1 /drivers | |
parent | ipv4: fib_trie: Use tnode_get_child_rcu() and node_parent_rcu() in lookups (diff) | |
download | linux-27e0955184a70c4bd4542ee2da18c749b4f43345.tar.xz linux-27e0955184a70c4bd4542ee2da18c749b4f43345.zip |
b44: strncpy does not null terminate string
strlcpy() will always null terminate the string. Also use the
sizeof(version) to strlcopy() the version string.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/b44.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/b44.c b/drivers/net/b44.c index 36d4d377ec2f..1f7f015442df 100644 --- a/drivers/net/b44.c +++ b/drivers/net/b44.c @@ -1756,15 +1756,15 @@ static void b44_get_drvinfo (struct net_device *dev, struct ethtool_drvinfo *inf struct b44 *bp = netdev_priv(dev); struct ssb_bus *bus = bp->sdev->bus; - strncpy(info->driver, DRV_MODULE_NAME, sizeof(info->driver)); - strncpy(info->version, DRV_MODULE_VERSION, sizeof(info->driver)); + strlcpy(info->driver, DRV_MODULE_NAME, sizeof(info->driver)); + strlcpy(info->version, DRV_MODULE_VERSION, sizeof(info->version)); switch (bus->bustype) { case SSB_BUSTYPE_PCI: - strncpy(info->bus_info, pci_name(bus->host_pci), sizeof(info->bus_info)); + strlcpy(info->bus_info, pci_name(bus->host_pci), sizeof(info->bus_info)); break; case SSB_BUSTYPE_PCMCIA: case SSB_BUSTYPE_SSB: - strncpy(info->bus_info, "SSB", sizeof(info->bus_info)); + strlcpy(info->bus_info, "SSB", sizeof(info->bus_info)); break; } } |