summaryrefslogtreecommitdiffstats
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:05:21 +0100
commit1ddb18916e452fa00f884388c7b10e65a31cc4bb (patch)
tree4cc75767fb8b6baa0da272c0bbf520962ec72210
parent8a315d644107dce90e19b51edd799a2796fd2239 (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)
-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 */