DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Reshma Pattan <reshma.pattan@intel.com>
Cc: dev@dpdk.org, Ferruh Yigit <ferruh.yigit@intel.com>, stable@dpdk.org
Subject: [dpdk-dev] [PATCH] test/reorder: fix out of bound access
Date: Tue, 13 Nov 2018 23:31:37 +0000	[thread overview]
Message-ID: <20181113233137.7570-1-ferruh.yigit@intel.com> (raw)

The value of array index 'i' is out of bound because of the previous
loop it has been used.

Assuming intention is using '0' since the check before free is robufs[0]
check, fixing according.

Fixes: ecd867faa860 ("test/reorder: fix freeing mbuf twice")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 test/test/test_reorder.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/test/test_reorder.c b/test/test/test_reorder.c
index ccee4d086..58fa9c71b 100644
--- a/test/test/test_reorder.c
+++ b/test/test/test_reorder.c
@@ -269,7 +269,7 @@ test_reorder_drain(void)
 		goto exit;
 	}
 	if (robufs[0] != NULL)
-		rte_pktmbuf_free(robufs[i]);
+		rte_pktmbuf_free(robufs[0]);
 
 	/* Insert more packets
 	 * RB[] = {NULL, NULL, NULL, NULL}
-- 
2.17.2

             reply	other threads:[~2018-11-13 23:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-13 23:31 Ferruh Yigit [this message]
2018-11-14  3:55 ` [dpdk-dev] [dpdk-stable] " 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=20181113233137.7570-1-ferruh.yigit@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=reshma.pattan@intel.com \
    --cc=stable@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).