cmdline: fix check in port list parsing
authorOlivier Matz <olivier.matz@6wind.com>
Wed, 4 Feb 2015 09:49:25 +0000 (10:49 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 20 Feb 2015 09:50:16 +0000 (10:50 +0100)
commitac09cd97322fd3524082333aaab10885503eec83
tree6091d6e067964e61808863ad3b8e946dd4f3474c
parentd3aa5274ca46faacf08934d285bb4b4f2cd6d115
cmdline: fix check in port list parsing

The argument ressize contains the size of the result buffer which
should be large enough to store the parsed result of a token. In
this case, it should be larger or equal to sizeof(cmdline_portlist_t)
(4 bytes), not PORTLIST_TOKEN_SIZE which is the max size of the token
string.

This is not a critical, it fixes cases where the total length of the
parsed instruction is greater than the maximum.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
lib/librte_cmdline/cmdline_parse_portlist.c