diff options
author | shashankmca80 <38880505+shashankmca80@users.noreply.github.com> | 2024-01-13 18:16:25 +0530 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2024-01-19 14:05:10 +0100 |
commit | 90b375739952693c582e149b12a533b88fd32e71 (patch) | |
tree | 4ba01d136f832f7863507a9eecb6c242541fb434 | |
parent | b7275c5e5c1c7b025bf2eb74fd1344b6abe48c06 (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.c | 2 |
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 */ |