summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorshashankmca80 <38880505+shashankmca80@users.noreply.github.com>2024-01-13 18:16:25 +0530
committerTomas Mraz <tomas@openssl.org>2024-01-19 14:04:56 +0100
commite554f9f24918a9f2050434b01c531c636408da4f (patch)
treecb2990fed71d748028cafcf1be9665ffc7952170 /test
parent603505f1221713db8269450f90c1e843b3013612 (diff)
Uninitialized array variable
array"key" is uninitialized and it is being read directly in function SipHash_Init() as per the below statements making a way for the garbage values : uint64_t k0 = U8TO64_LE(k); uint64_t k1 = U8TO64_LE(k + 8); CLA: trivial Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23298) (cherry picked from commit a0826b184eed2dccc56cdf80e3e0bc061cc89ddc)
Diffstat (limited to 'test')
-rw-r--r--test/siphash_internal_test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/siphash_internal_test.c b/test/siphash_internal_test.c
index 76ae5ecabc..3ab1677d2d 100644
--- a/test/siphash_internal_test.c
+++ b/test/siphash_internal_test.c
@@ -257,7 +257,7 @@ static int test_siphash(int idx)
static int test_siphash_basic(void)
{
SIPHASH siphash = { 0, };
- unsigned char key[SIPHASH_KEY_SIZE];
+ static const unsigned char key[SIPHASH_KEY_SIZE] = {0};
unsigned char output[SIPHASH_MAX_DIGEST_SIZE];
/* Use invalid hash size */