Skip to content

Commit 072ee3f

Browse files
Roel Kluindavem330
authored andcommitted
[TEHUTI]: Fix incorrect usage of strncat in bdx_get_drvinfo()
Fix incorrect length for strncat by replacing it with strlcat Signed-off-by: Roel Kluin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 9db7720 commit 072ee3f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/net/tehuti.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2168,10 +2168,10 @@ bdx_get_drvinfo(struct net_device *netdev, struct ethtool_drvinfo *drvinfo)
21682168
{
21692169
struct bdx_priv *priv = netdev->priv;
21702170

2171-
strncat(drvinfo->driver, BDX_DRV_NAME, sizeof(drvinfo->driver));
2172-
strncat(drvinfo->version, BDX_DRV_VERSION, sizeof(drvinfo->version));
2173-
strncat(drvinfo->fw_version, "N/A", sizeof(drvinfo->fw_version));
2174-
strncat(drvinfo->bus_info, pci_name(priv->pdev),
2171+
strlcat(drvinfo->driver, BDX_DRV_NAME, sizeof(drvinfo->driver));
2172+
strlcat(drvinfo->version, BDX_DRV_VERSION, sizeof(drvinfo->version));
2173+
strlcat(drvinfo->fw_version, "N/A", sizeof(drvinfo->fw_version));
2174+
strlcat(drvinfo->bus_info, pci_name(priv->pdev),
21752175
sizeof(drvinfo->bus_info));
21762176

21772177
drvinfo->n_stats = ((priv->stats_flag) ?

0 commit comments

Comments
 (0)