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 2B760A0C4E; Mon, 12 Jul 2021 20:18:47 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DF83E411B4; Mon, 12 Jul 2021 20:18:42 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id D80794069D for ; Mon, 12 Jul 2021 20:18:40 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10043"; a="190412570" X-IronPort-AV: E=Sophos;i="5.84,234,1620716400"; d="scan'208";a="190412570" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jul 2021 11:18:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,234,1620716400"; d="scan'208";a="486739491" Received: from silpixa00400573.ir.intel.com (HELO silpixa00400573.ger.corp.intel.com) ([10.237.223.107]) by fmsmga004.fm.intel.com with ESMTP; 12 Jul 2021 11:18:36 -0700 From: Cristian Dumitrescu To: dev@dpdk.org Date: Mon, 12 Jul 2021 19:18:33 +0100 Message-Id: <20210712181833.15293-2-cristian.dumitrescu@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210712181833.15293-1-cristian.dumitrescu@intel.com> References: <20210712181833.15293-1-cristian.dumitrescu@intel.com> Subject: [dpdk-dev] [PATCH 2/2] examples/pipeline: fix incorrect array out of bounds check X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" Fix the incorrect array out of bounds check within the function pipeline_selector_group_member_read(). Coverity issue: 371911 Fixes: 598fe0dd0d8e3 ("examples/pipeline: support selector table") Signed-off-by: Cristian Dumitrescu --- examples/pipeline/cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/pipeline/cli.c b/examples/pipeline/cli.c index f67783c8fa..a29be05ef4 100644 --- a/examples/pipeline/cli.c +++ b/examples/pipeline/cli.c @@ -1511,7 +1511,7 @@ pipeline_selector_group_member_read(const char *string, if (!token || token_is_comment(token)) break; - if (n_tokens > GROUP_MEMBER_INFO_TOKENS_MAX) + if (n_tokens >= GROUP_MEMBER_INFO_TOKENS_MAX) goto error; token_array[n_tokens] = token; -- 2.17.1