app/testpmd: fix potential out of bounds read
authorJulien Cretin <julien.cretin@trust-in-soft.com>
Mon, 9 Mar 2015 13:21:09 +0000 (14:21 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 23 Mar 2015 11:35:20 +0000 (12:35 +0100)
commit12a8e30fd73dbb6c238a585c995eca5e2c58e24f
treeece046405ac437b9535fb1e82b87905a53e05ace
parent42a03256321858a576cef1d2c351b1015b3b4bf4
app/testpmd: fix potential out of bounds read

After the last enabled port has been seen, and the last time we
evaluate the loop condition, there is an out of bounds read in
ports[p].enabled because p is equal to size, which is the length of
ports.

Signed-off-by: Julien Cretin <julien.cretin@trust-in-soft.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
app/test-pmd/testpmd.c