From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
To: dev@dpdk.org
Cc: Yipeng Wang <yipeng1.wang@intel.com>,
Sameh Gobriel <sameh.gobriel@intel.com>,
Bruce Richardson <bruce.richardson@intel.com>,
Vladimir Medvedkin <vladimir.medvedkin@intel.com>,
Gavin Hu <gavin.hu@arm.com>,
Dharmik Thakkar <dharmik.thakkar@arm.com>,
Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>,
Heinrich Schuchardt <heinrich.schuchardt@canonical.com>,
stable@dpdk.org
Subject: [PATCH] test/hash: avoid out of bound access
Date: Sat, 4 Jun 2022 10:37:11 +0200 [thread overview]
Message-ID: <20220604083711.64199-1-heinrich.schuchardt@canonical.com> (raw)
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
next reply other threads:[~2022-06-04 8:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-04 8:37 Heinrich Schuchardt [this message]
2022-06-26 15:03 ` 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=20220604083711.64199-1-heinrich.schuchardt@canonical.com \
--to=heinrich.schuchardt@canonical.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=dharmik.thakkar@arm.com \
--cc=gavin.hu@arm.com \
--cc=honnappa.nagarahalli@arm.com \
--cc=sameh.gobriel@intel.com \
--cc=stable@dpdk.org \
--cc=vladimir.medvedkin@intel.com \
--cc=yipeng1.wang@intel.com \
/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).