Skip to content

Commit

Permalink
[TEHUTI]: Fix incorrect usage of strncat in bdx_get_drvinfo()
Browse files Browse the repository at this point in the history
Fix incorrect length for strncat by replacing it with strlcat

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Roel Kluin authored and David S. Miller committed Nov 13, 2007
1 parent 9db7720 commit 072ee3f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/net/tehuti.c
Original file line number Diff line number Diff line change
Expand Up @@ -2168,10 +2168,10 @@ bdx_get_drvinfo(struct net_device *netdev, struct ethtool_drvinfo *drvinfo)
{
struct bdx_priv *priv = netdev->priv;

strncat(drvinfo->driver, BDX_DRV_NAME, sizeof(drvinfo->driver));
strncat(drvinfo->version, BDX_DRV_VERSION, sizeof(drvinfo->version));
strncat(drvinfo->fw_version, "N/A", sizeof(drvinfo->fw_version));
strncat(drvinfo->bus_info, pci_name(priv->pdev),
strlcat(drvinfo->driver, BDX_DRV_NAME, sizeof(drvinfo->driver));
strlcat(drvinfo->version, BDX_DRV_VERSION, sizeof(drvinfo->version));
strlcat(drvinfo->fw_version, "N/A", sizeof(drvinfo->fw_version));
strlcat(drvinfo->bus_info, pci_name(priv->pdev),
sizeof(drvinfo->bus_info));

drvinfo->n_stats = ((priv->stats_flag) ?
Expand Down

0 comments on commit 072ee3f

Please sign in to comment.