summaryrefslogtreecommitdiff
path: root/drivers/net/i40e
diff options
context:
space:
mode:
authorChaitanya Babu Talluri <tallurix.chaitanya.babu@intel.com>2019-03-22 07:51:42 +0000
committerFerruh Yigit <ferruh.yigit@intel.com>2019-03-22 11:32:53 +0100
commitfaf8c3095ac649f3d893ee846e2aa7cf1b4ccf4d (patch)
tree7b66928167236797dc293c32c37984633dd49f74 /drivers/net/i40e
parent88245e7e215272203355f4a671526d193db7a595 (diff)
downloaddpdk-next-eventdev-faf8c3095ac649f3d893ee846e2aa7cf1b4ccf4d.zip
dpdk-next-eventdev-faf8c3095ac649f3d893ee846e2aa7cf1b4ccf4d.tar.gz
dpdk-next-eventdev-faf8c3095ac649f3d893ee846e2aa7cf1b4ccf4d.tar.xz
drivers/net: fix possible overflow using strlcat
strcat does not check the destination length and there might be chances of string overflow so instead of strcat, strlcat is used. Fixes: 540a211084a7 ("bnx2x: driver core") Fixes: e163c18a15b0 ("net/i40e: update ptype and pctype info") Cc: stable@dpdk.org Signed-off-by: Chaitanya Babu Talluri <tallurix.chaitanya.babu@intel.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Shahed Shaikh <shshaikh@marvell.com>
Diffstat (limited to 'drivers/net/i40e')
-rw-r--r--drivers/net/i40e/i40e_ethdev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 8191a6a..63ec813 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -12202,8 +12202,8 @@ i40e_update_customized_pctype(struct rte_eth_dev *dev, uint8_t *pkg,
for (n = 0; n < proto_num; n++) {
if (proto[n].proto_id != proto_id)
continue;
- strcat(name, proto[n].name);
- strcat(name, "_");
+ strlcat(name, proto[n].name, sizeof(name));
+ strlcat(name, "_", sizeof(name));
break;
}
}