* [dpdk-dev] [PATCH 1/2] pipeline: fix incorrect resource free function
@ 2021-07-12 18:18 Cristian Dumitrescu
2021-07-12 18:18 ` [dpdk-dev] [PATCH 2/2] examples/pipeline: fix incorrect array out of bounds check Cristian Dumitrescu
0 siblings, 1 reply; 3+ messages in thread
From: Cristian Dumitrescu @ 2021-07-12 18:18 UTC (permalink / raw)
To: dev
Due to a typo, the selector_free() function incorrectly takes an early
return when the selectors array is non-NULL, as opposed to the other
way around.
Coverity issue: 371912
Fixes: cdaa937d3eaab ("pipeline: support selector table")
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
lib/pipeline/rte_swx_ctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/pipeline/rte_swx_ctl.c b/lib/pipeline/rte_swx_ctl.c
index f1480bc27b..dc093860de 100644
--- a/lib/pipeline/rte_swx_ctl.c
+++ b/lib/pipeline/rte_swx_ctl.c
@@ -815,7 +815,7 @@ selector_free(struct rte_swx_ctl_pipeline *ctl)
{
uint32_t i;
- if (ctl->selectors)
+ if (!ctl->selectors)
return;
for (i = 0; i < ctl->info.n_selectors; i++) {
--
2.17.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [dpdk-dev] [PATCH 2/2] examples/pipeline: fix incorrect array out of bounds check
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
2021-07-21 11:46 ` Thomas Monjalon
0 siblings, 1 reply; 3+ messages in thread
From: Cristian Dumitrescu @ 2021-07-12 18:18 UTC (permalink / raw)
To: 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 <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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH 2/2] examples/pipeline: fix incorrect array out of bounds check
2021-07-12 18:18 ` [dpdk-dev] [PATCH 2/2] examples/pipeline: fix incorrect array out of bounds check Cristian Dumitrescu
@ 2021-07-21 11:46 ` Thomas Monjalon
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2021-07-21 11:46 UTC (permalink / raw)
To: Cristian Dumitrescu; +Cc: dev
12/07/2021 20:18, Cristian Dumitrescu:
> 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>
Pathset applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-07-21 11:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-12 18:18 [dpdk-dev] [PATCH 1/2] pipeline: fix incorrect resource free function Cristian Dumitrescu
2021-07-12 18:18 ` [dpdk-dev] [PATCH 2/2] examples/pipeline: fix incorrect array out of bounds check Cristian Dumitrescu
2021-07-21 11:46 ` Thomas Monjalon
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).