Commit 072ee3f9 authored by Roel Kluin's avatar Roel Kluin Committed by David S. Miller

[TEHUTI]: Fix incorrect usage of strncat in bdx_get_drvinfo()

Fix incorrect length for strncat by replacing it with strlcat
Signed-off-by: default avatarRoel Kluin <12o3l@tiscali.nl>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9db7720c
...@@ -2168,10 +2168,10 @@ bdx_get_drvinfo(struct net_device *netdev, struct ethtool_drvinfo *drvinfo) ...@@ -2168,10 +2168,10 @@ bdx_get_drvinfo(struct net_device *netdev, struct ethtool_drvinfo *drvinfo)
{ {
struct bdx_priv *priv = netdev->priv; struct bdx_priv *priv = netdev->priv;
strncat(drvinfo->driver, BDX_DRV_NAME, sizeof(drvinfo->driver)); strlcat(drvinfo->driver, BDX_DRV_NAME, sizeof(drvinfo->driver));
strncat(drvinfo->version, BDX_DRV_VERSION, sizeof(drvinfo->version)); strlcat(drvinfo->version, BDX_DRV_VERSION, sizeof(drvinfo->version));
strncat(drvinfo->fw_version, "N/A", sizeof(drvinfo->fw_version)); strlcat(drvinfo->fw_version, "N/A", sizeof(drvinfo->fw_version));
strncat(drvinfo->bus_info, pci_name(priv->pdev), strlcat(drvinfo->bus_info, pci_name(priv->pdev),
sizeof(drvinfo->bus_info)); sizeof(drvinfo->bus_info));
drvinfo->n_stats = ((priv->stats_flag) ? drvinfo->n_stats = ((priv->stats_flag) ?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment