From 1e5fc8338ca8eb409659bb29d000dbc84c9611a6 Mon Sep 17 00:00:00 2001 From: Nevine Ebeid Date: Wed, 24 Jul 2024 18:33:55 -0400 Subject: [PATCH] Fix valgrind initialization complaint in amazonlinux2023_gcc11x_aarch_valgrind. --- crypto/fipsmodule/aes/aes_test.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crypto/fipsmodule/aes/aes_test.cc b/crypto/fipsmodule/aes/aes_test.cc index 9cc6338fb3..195b5f536b 100644 --- a/crypto/fipsmodule/aes/aes_test.cc +++ b/crypto/fipsmodule/aes/aes_test.cc @@ -481,6 +481,11 @@ TEST(AESTest, ABI) { block, AES_ENCRYPT); #if defined(OPENSSL_ARM) || defined(OPENSSL_AARCH64) if (blocks == 0) { + // Without this initialization, valgrind complains + // about using an unitialized value. + for (size_t i = 0; i < 64; i++) { + buf[i] = i; + } Bytes buf_before = Bytes(buf,64); CHECK_ABI(aes_hw_ctr32_encrypt_blocks, buf, buf, blocks, &key, block); EXPECT_EQ(buf_before, Bytes(buf,64));