DPDK patches and discussions
 help / color / mirror / Atom feed
From: Rongqiang XIE <xie.rongqiang@zte.com.cn>
To: cristian.dumitrescu@intel.com
Cc: dev@dpdk.org, Rongqiang XIE <xie.rongqiang@zte.com.cn>
Subject: [dpdk-dev] [PATCH] lib/librte_pipeline:fix the array index out of bound
Date: Wed, 23 Aug 2017 15:05:32 +0800	[thread overview]
Message-ID: <1503471932-22577-1-git-send-email-xie.rongqiang@zte.com.cn> (raw)

In function rte_pipeline_compute_masks(), the value pos equal
p->entries[i]->action,type constraint p->entries[i]->action is
[0,4],but array action_mask1 size is 4,it possible attempt to
access element 4 of array action_mask1.And also in function
rte_pipeline_run(),it possible attempt to access element 4 of
array action_mask0.

Signed-off-by: Rongqiang XIE <xie.rongqiang@zte.com.cn>
---
 lib/librte_pipeline/rte_pipeline.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_pipeline/rte_pipeline.c b/lib/librte_pipeline/rte_pipeline.c
index 7f8fbac..2914445 100644
--- a/lib/librte_pipeline/rte_pipeline.c
+++ b/lib/librte_pipeline/rte_pipeline.c
@@ -155,8 +155,8 @@ struct rte_pipeline {
 	/* Pipeline run structures */
 	struct rte_mbuf *pkts[RTE_PORT_IN_BURST_SIZE_MAX];
 	struct rte_pipeline_table_entry *entries[RTE_PORT_IN_BURST_SIZE_MAX];
-	uint64_t action_mask0[RTE_PIPELINE_ACTIONS];
-	uint64_t action_mask1[RTE_PIPELINE_ACTIONS];
+	uint64_t action_mask0[RTE_PIPELINE_ACTIONS + 1];
+	uint64_t action_mask1[RTE_PIPELINE_ACTIONS + 1];
 	uint64_t pkts_mask;
 	uint64_t n_pkts_ah_drop;
 	uint64_t pkts_drop_mask;
-- 
1.8.3.1

             reply	other threads:[~2017-08-23  7:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-23  7:05 Rongqiang XIE [this message]
2017-09-04 13:37 ` Singh, Jasvinder
2017-09-20 12:01 ` Dumitrescu, Cristian

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=1503471932-22577-1-git-send-email-xie.rongqiang@zte.com.cn \
    --to=xie.rongqiang@zte.com.cn \
    --cc=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).