From patchwork Wed Jan 31 13:46:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mokhtar, Amr" X-Patchwork-Id: 34770 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 802E81B770; Wed, 31 Jan 2018 14:46:30 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 3E57D1B745 for ; Wed, 31 Jan 2018 14:46:29 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Jan 2018 05:46:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,440,1511856000"; d="scan'208";a="200101379" Received: from silpixa00391537.ir.intel.com (HELO silpixa00391537.ger.corp.intel.com) ([10.237.222.189]) by fmsmga005.fm.intel.com with ESMTP; 31 Jan 2018 05:46:27 -0800 From: Amr Mokhtar To: dev@dpdk.org Cc: Amr Mokhtar Date: Wed, 31 Jan 2018 13:46:21 +0000 Message-Id: <1517406381-130154-1-git-send-email-amr.mokhtar@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH] app/testbbdev: fix out-of-bounds read X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Coverity issue: 257033 Fixes: f714a18885a6 ("app/testbbdev: add test application for bbdev") Signed-off-by: Amr Mokhtar --- app/test-bbdev/test_bbdev_vector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test-bbdev/test_bbdev_vector.c b/app/test-bbdev/test_bbdev_vector.c index 2d0852c..addef05 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; }