* [dpdk-dev] [PATCH] test/reorder: fix out of bound access
@ 2018-11-13 23:31 Ferruh Yigit
2018-11-14 3:55 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
0 siblings, 1 reply; 2+ messages in thread
From: Ferruh Yigit @ 2018-11-13 23:31 UTC (permalink / raw)
To: Reshma Pattan; +Cc: dev, Ferruh Yigit, stable
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH] test/reorder: fix out of bound access
2018-11-13 23:31 [dpdk-dev] [PATCH] test/reorder: fix out of bound access Ferruh Yigit
@ 2018-11-14 3:55 ` Thomas Monjalon
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2018-11-14 3:55 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: stable, Reshma Pattan, dev
14/11/2018 00:31, Ferruh Yigit:
> 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>
Applied, thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-14 3:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-13 23:31 [dpdk-dev] [PATCH] test/reorder: fix out of bound access Ferruh Yigit
2018-11-14 3:55 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
DPDK patches and discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
dev@dpdk.org
public-inbox-index dev
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://inbox.dpdk.org/inbox.dpdk.dev
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git