numam-dpdk/app/test-pmd
Ferruh Yigit 5e4154cec4 app/testpmd: guarantee port array access in range
Coverity complains about out of bound access, which is a false positive.

The return value of the 'parse_port_list()' can't be bigger than
'maxsize' because of the logic in the function. ('value >= (int)maxsize'
check and 'marked[]' usage.)

But this is not explicitly clear, causing coverity warning and same
question can be rise by reviews later.

Adding a redundant check to highlight the access is in range, this is
done by replacing existing redundant check.

This is also good to protect against out out bound access in case
'parse_port_list()' behaviour changes later unexpectedly.

Coverity issue: 354229
Fixes: 2df00d562d ("app/testpmd: add --portlist option")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2020-02-19 15:40:24 +01:00
..
bpf_cmd.c bpf: add extra information for external symbol definitions 2018-07-12 09:37:16 +02:00
bpf_cmd.h app/testpmd: add commands to load/unload BPF filters 2018-05-12 00:37:51 +02:00
cmdline_flow.c app/testpmd: fix uninitialized members of MPLS 2020-02-05 09:51:21 +01:00
cmdline_mtr.c meter: replace color definitions 2019-04-11 14:27:32 +02:00
cmdline_mtr.h app/testpmd: add commands for metering and policing 2018-01-10 00:51:31 +01:00
cmdline_tm.c meter: replace color definitions 2019-04-11 14:27:32 +02:00
cmdline_tm.h app/testpmd: add TM commands to mark packets 2018-10-08 17:53:03 +02:00
cmdline.c app/testpmd: rename function for detaching by devargs 2020-02-14 12:42:13 +01:00
config.c app/testpmd: guarantee port array access in range 2020-02-19 15:40:24 +01:00
csumonly.c net: use IPV4 VHL constant 2019-11-20 17:36:06 +01:00
flowgen.c fix Mellanox copyright and SPDX tag 2020-02-13 18:47:28 +01:00
icmpecho.c app: use common macro RTE_DIM 2020-02-05 14:37:41 +01:00
ieee1588fwd.c net: add rte prefix to ether defines 2019-05-24 13:34:45 +02:00
iofwd.c app: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
macfwd.c net: add rte prefix to IP structure 2019-05-24 13:34:46 +02:00
macswap_common.h net: add rte prefix to IP structure 2019-05-24 13:34:46 +02:00
macswap_neon.h net: add rte prefix to ether structures 2019-05-24 13:34:45 +02:00
macswap_sse.h net: add rte prefix to ether structures 2019-05-24 13:34:45 +02:00
macswap.c fix Mellanox copyright and SPDX tag 2020-02-13 18:47:28 +01:00
macswap.h net: add rte prefix to ether functions 2019-05-24 13:34:45 +02:00
Makefile mk: build with _GNU_SOURCE defined by default 2018-10-22 11:28:27 +02:00
meson.build build: add dependency on telemetry to apps with meson 2018-10-27 15:21:33 +02:00
noisy_vnf.c app/testpmd: add noisy neighbour forwarding mode 2018-10-11 18:56:02 +02:00
parameters.c app/testpmd: add --portlist option 2020-02-14 12:42:12 +01:00
rxonly.c app/testpmd: add packet dump callbacks 2018-10-18 10:24:39 +02:00
softnicfwd.c app/testpmd: check status of getting link info 2019-10-07 15:00:54 +02:00
testpmd.c app/testpmd: fix hot-unplug detaching 2020-02-14 12:42:13 +01:00
testpmd.h app/testpmd: rename function for detaching by devargs 2020-02-14 12:42:13 +01:00
txonly.c app/testpmd: fix txonly flow generation entropy 2020-02-14 12:42:12 +01:00
util.c fix Mellanox copyright and SPDX tag 2020-02-13 18:47:28 +01:00