From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 2/2] examples/pipeline: fix incorrect array out of bounds check
Date: Mon, 12 Jul 2021 19:18:33 +0100 [thread overview]
Message-ID: <20210712181833.15293-2-cristian.dumitrescu@intel.com> (raw)
In-Reply-To: <20210712181833.15293-1-cristian.dumitrescu@intel.com>
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 <cristian.dumitrescu@intel.com>
---
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
next prev parent reply other threads:[~2021-07-12 18:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-12 18:18 [dpdk-dev] [PATCH 1/2] pipeline: fix incorrect resource free function Cristian Dumitrescu
2021-07-12 18:18 ` Cristian Dumitrescu [this message]
2021-07-21 11:46 ` [dpdk-dev] [PATCH 2/2] examples/pipeline: fix incorrect array out of bounds check Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210712181833.15293-2-cristian.dumitrescu@intel.com \
--to=cristian.dumitrescu@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).