git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
app/testpmd: fix potential out of bounds read
[dpdk.git]
/
app
/
test-pmd
/
testpmd.c
diff --git
a/app/test-pmd/testpmd.c
b/app/test-pmd/testpmd.c
index
4828354
..
3057791
100644
(file)
--- a/
app/test-pmd/testpmd.c
+++ b/
app/test-pmd/testpmd.c
@@
-332,7
+332,7
@@
find_next_port(portid_t p, struct rte_port *ports, int size)
if (ports == NULL)
rte_exit(-EINVAL, "failed to find a next port id\n");
- while ((p
orts[p].enabled == 0) && (p < size
))
+ while ((p
< size) && (ports[p].enabled == 0
))
p++;
return p;
}