patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] test/hash: avoid out of bound access
@ 2022-06-04  8:37 Heinrich Schuchardt
  2022-06-26 15:03 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Heinrich Schuchardt @ 2022-06-04  8:37 UTC (permalink / raw)
  To: dev
  Cc: Yipeng Wang, Sameh Gobriel, Bruce Richardson, Vladimir Medvedkin,
	Gavin Hu, Dharmik Thakkar, Honnappa Nagarahalli,
	Heinrich Schuchardt, stable

rwc_non_lf_results->multi_rw, rwc_lf_results->multi_rw, and
rwc_perf_results->multi_rw are accessed at indexes
[0..NUM_TEST-1][0..1][0..NUMTEST-1]. Currently the first index
overflows the array size in struct rwc_perf.

Fixes: c7eb0972e74b ("test/test/test_hash_readwrite_lf.c")
Cc: Dharmik Thakkar <dharmik.thakkar@arm.com>
Cc: stable@dpdk.org 
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
 app/test/test_hash_readwrite_lf_perf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_hash_readwrite_lf_perf.c b/app/test/test_hash_readwrite_lf_perf.c
index 8120cf43be..32f9ec9250 100644
--- a/app/test/test_hash_readwrite_lf_perf.c
+++ b/app/test/test_hash_readwrite_lf_perf.c
@@ -59,7 +59,7 @@ struct rwc_perf {
 	uint32_t w_ks_r_hit_nsp[2][NUM_TEST];
 	uint32_t w_ks_r_hit_sp[2][NUM_TEST];
 	uint32_t w_ks_r_miss[2][NUM_TEST];
-	uint32_t multi_rw[NUM_TEST - 1][2][NUM_TEST];
+	uint32_t multi_rw[NUM_TEST][2][NUM_TEST];
 	uint32_t w_ks_r_hit_extbkt[2][NUM_TEST];
 	uint32_t writer_add_del[NUM_TEST];
 };
-- 
2.36.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-26 15:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-04  8:37 [PATCH] test/hash: avoid out of bound access Heinrich Schuchardt
2022-06-26 15:03 ` 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).