From patchwork Tue Jul 9 11:09:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Iremonger, Bernard" X-Patchwork-Id: 56267 X-Patchwork-Delegate: thomas@monjalon.net 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 ABB0A1B959; Tue, 9 Jul 2019 13:10:04 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 4519837A2; Tue, 9 Jul 2019 13:10:02 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jul 2019 04:10:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,470,1557212400"; d="scan'208";a="185891881" Received: from sivswdev08.ir.intel.com (HELO localhost.localdomain) ([10.237.217.47]) by fmsmga001.fm.intel.com with ESMTP; 09 Jul 2019 04:09:59 -0700 From: Bernard Iremonger To: dev@dpdk.org, jasvinder.singh@intel.com Cc: Bernard Iremonger , stable@dpdk.org Date: Tue, 9 Jul 2019 12:09:56 +0100 Message-Id: <1562670596-27129-1-git-send-email-bernard.iremonger@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH] librte_flow_classify: fix out-of-bounds access 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" This patch fixes the out-of-bounds coverity issue by removing the offending line of code at line 107 in rte_flow_classify_parse.c which is never executed. Coverity issue: 343454 Fixes: be41ac2a330f ("flow_classify: introduce flow classify library") Cc: stable@dpdk.org Signed-off-by: Bernard Iremonger Signed-off-by: Aaron Conole --- lib/librte_flow_classify/rte_flow_classify_parse.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/librte_flow_classify/rte_flow_classify_parse.c b/lib/librte_flow_classify/rte_flow_classify_parse.c index f65ceaf..4653302 100644 --- a/lib/librte_flow_classify/rte_flow_classify_parse.c +++ b/lib/librte_flow_classify/rte_flow_classify_parse.c @@ -103,8 +103,6 @@ classify_pattern_skip_void_item(struct rte_flow_item *items, pb = pe; break; } - - pb = pe + 1; } /* Copy the END item. */ rte_memcpy(items, pe, sizeof(struct rte_flow_item));