From: Amr Mokhtar Date: Wed, 31 Jan 2018 13:46:21 +0000 (+0000) Subject: app/bbdev: fix out-of-bounds read in vector array X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=218203502cde5779a0e1fe2ba60d514823176840;p=dpdk.git app/bbdev: fix out-of-bounds read in vector array Coverity issue: 257033 Fixes: f714a18885a6 ("app/testbbdev: add test application for bbdev") Signed-off-by: Amr Mokhtar --- diff --git a/app/test-bbdev/test_bbdev_vector.c b/app/test-bbdev/test_bbdev_vector.c index 2d0852cdb2..addef05728 100644 --- a/app/test-bbdev/test_bbdev_vector.c +++ b/app/test-bbdev/test_bbdev_vector.c @@ -288,7 +288,7 @@ parse_data_entry(const char *key_token, char *token, struct op_data_buf *op_data; unsigned int *nb_ops; - if (type > DATA_NUM_TYPES) { + if (type >= DATA_NUM_TYPES) { printf("Unknown op type: %d!\n", type); return -1; }