From: Chengwen Feng Date: Wed, 21 Apr 2021 02:33:13 +0000 (+0800) Subject: net/i40e: fix negative VEB index X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=47b6667abe533e8c61576aa4803f41daf988eb9b;p=dpdk.git net/i40e: fix negative VEB index This patch adds check for negative VEB index when parsing VEB list. Fixes: 79f2248219c0 ("net/i40e: add floating VEB option") Cc: stable@dpdk.org Signed-off-by: Chengwen Feng Signed-off-by: Min Hu (Connor) Acked-by: Qi Zhang --- diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 66d23d698e..d0586201f8 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -854,6 +854,8 @@ floating_veb_list_handler(__rte_unused const char *key, idx = strtoul(floating_veb_value, &end, 10); if (errno || end == NULL) return -1; + if (idx < 0) + return -1; while (isblank(*end)) end++; if (*end == '-') {