* [dpdk-dev] [PATCH] app/test: Fix potential null pointer accesses in test_mbuf
@ 2015-06-12 2:54 Tetsuya Mukawa
2015-06-22 21:07 ` Thomas Monjalon
0 siblings, 1 reply; 2+ messages in thread
From: Tetsuya Mukawa @ 2015-06-12 2:54 UTC (permalink / raw)
To: dev
The patch fixes potential null pointer accesses in test_mbuf.
if 'm[i]' is null, stop accessing it.
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
---
app/test/test_mbuf.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
index 5e8a377..5d13b37 100644
--- a/app/test/test_mbuf.c
+++ b/app/test/test_mbuf.c
@@ -594,6 +594,7 @@ test_pktmbuf_pool_ptr(void)
if (m[i] == NULL) {
printf("rte_pktmbuf_alloc() failed (%u)\n", i);
ret = -1;
+ break;
}
m[i]->data_off += 64;
}
@@ -613,6 +614,7 @@ test_pktmbuf_pool_ptr(void)
if (m[i] == NULL) {
printf("rte_pktmbuf_alloc() failed (%u)\n", i);
ret = -1;
+ break;
}
if (m[i]->data_off != RTE_PKTMBUF_HEADROOM) {
printf("invalid data_off\n");
--
2.1.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] app/test: Fix potential null pointer accesses in test_mbuf
2015-06-12 2:54 [dpdk-dev] [PATCH] app/test: Fix potential null pointer accesses in test_mbuf Tetsuya Mukawa
@ 2015-06-22 21:07 ` Thomas Monjalon
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2015-06-22 21:07 UTC (permalink / raw)
To: Tetsuya Mukawa; +Cc: dev
2015-06-12 11:54, Tetsuya Mukawa:
> The patch fixes potential null pointer accesses in test_mbuf.
> if 'm[i]' is null, stop accessing it.
>
> Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Applied, thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-06-22 21:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-12 2:54 [dpdk-dev] [PATCH] app/test: Fix potential null pointer accesses in test_mbuf Tetsuya Mukawa
2015-06-22 21:07 ` 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).