aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/b44.c
diff options
context:
space:
mode:
authorroel kluin <roel.kluin@gmail.com>2009-07-17 04:01:54 -0400
committerDavid S. Miller <davem@davemloft.net>2009-07-20 11:02:58 -0400
commit27e0955184a70c4bd4542ee2da18c749b4f43345 (patch)
tree34e2237c397d591ddb53eea5d421052ee617c1f1 /drivers/net/b44.c
parentb902e5735272b6a79fe2853180b2ad6658aa9678 (diff)
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/net/b44.c')
-rw-r--r--drivers/net/b44.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/b44.c b/drivers/net/b44.c
index 36d4d377ec2..1f7f015442d 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
1756 struct b44 *bp = netdev_priv(dev); 1756 struct b44 *bp = netdev_priv(dev);
1757 struct ssb_bus *bus = bp->sdev->bus; 1757 struct ssb_bus *bus = bp->sdev->bus;
1758 1758
1759 strncpy(info->driver, DRV_MODULE_NAME, sizeof(info->driver)); 1759 strlcpy(info->driver, DRV_MODULE_NAME, sizeof(info->driver));
1760 strncpy(info->version, DRV_MODULE_VERSION, sizeof(info->driver)); 1760 strlcpy(info->version, DRV_MODULE_VERSION, sizeof(info->version));
1761 switch (bus->bustype) { 1761 switch (bus->bustype) {
1762 case SSB_BUSTYPE_PCI: 1762 case SSB_BUSTYPE_PCI:
1763 strncpy(info->bus_info, pci_name(bus->host_pci), sizeof(info->bus_info)); 1763 strlcpy(info->bus_info, pci_name(bus->host_pci), sizeof(info->bus_info));
1764 break; 1764 break;
1765 case SSB_BUSTYPE_PCMCIA: 1765 case SSB_BUSTYPE_PCMCIA:
1766 case SSB_BUSTYPE_SSB: 1766 case SSB_BUSTYPE_SSB:
1767 strncpy(info->bus_info, "SSB", sizeof(info->bus_info)); 1767 strlcpy(info->bus_info, "SSB", sizeof(info->bus_info));
1768 break; 1768 break;
1769 } 1769 }
1770} 1770}