From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B4E31A0C4B for ; Thu, 21 Oct 2021 12:33:44 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A63A3410E2; Thu, 21 Oct 2021 12:33:44 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id D46C3410E2; Thu, 21 Oct 2021 12:33:42 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10143"; a="227768434" X-IronPort-AV: E=Sophos;i="5.87,169,1631602800"; d="scan'208";a="227768434" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Oct 2021 03:33:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,169,1631602800"; d="scan'208";a="491706958" Received: from ena-4.iind.intel.com ([10.190.200.151]) by fmsmga007.fm.intel.com with ESMTP; 21 Oct 2021 03:33:40 -0700 From: Yogesh Jangra To: dev@dpdk.org Cc: cristian.dumitrescu@intel.com, venkata.suresh.kumar.p@intel.com, yogesh.jangra@intel.com, stable@dpdk.org Date: Wed, 20 Oct 2021 23:23:32 -0400 Message-Id: <1634786612-115588-1-git-send-email-yogesh.jangra@intel.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH] pipeline: fix instruction label check X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" The instruction_data array was incorrectly indexed, which resulted in the array index getting out of bounds and sometimes segfault. Fixes: a1711f (“pipeline: add SWX Rx and extract instructions“) Cc: stable@dpdk.org Signed-off-by: Yogesh Jangra Acked-by: Cristian Dumitrescu --- lib/pipeline/rte_swx_pipeline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pipeline/rte_swx_pipeline.c b/lib/pipeline/rte_swx_pipeline.c index 1cd09a4..0550560 100644 --- a/lib/pipeline/rte_swx_pipeline.c +++ b/lib/pipeline/rte_swx_pipeline.c @@ -5983,7 +5983,7 @@ struct_field_parse(struct rte_swx_pipeline *p, continue; for (j = i + 1; j < n_instructions; j++) - CHECK(strcmp(label, data[j].label), EINVAL); + CHECK(strcmp(label, instruction_data[j].label), EINVAL); } /* Get users for each instruction label. */ -- 1.8.3.1