[dpdk-dev] [PATCH 1/2] net/i40e: fix veb index negative was not checked
Min Hu (Connor)
humin29 at huawei.com
Wed Apr 21 04:33:13 CEST 2021
From: Chengwen Feng <fengchengwen at huawei.com>
This patch adds checking for veb index negative when parsing veb list.
Fixes: 79f2248219c0 (net/i40e: add floating VEB option)
Cc: stable at dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
Signed-off-by: Min Hu (Connor) <humin29 at huawei.com>
---
drivers/net/i40e/i40e_ethdev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index e6206a7..c897c81 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 == '-') {
--
2.7.4
More information about the dev
mailing list