Skip to content

Commit

Permalink
net/i40e: fix negative VEB index
Browse files Browse the repository at this point in the history
[ upstream commit 47b6667 ]

This patch adds check for negative VEB index when parsing VEB list.

Fixes: 79f2248 ("net/i40e: add floating VEB option")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
  • Loading branch information
fengchengwen authored and steevenlee committed Jun 8, 2021
1 parent 3085e8a commit 35e1338
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/i40e/i40e_ethdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,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 == '-') {
Expand Down

0 comments on commit 35e1338

Please sign in to comment.