Skip to content

Commit

Permalink
Fix valgrind initialization complaint
Browse files Browse the repository at this point in the history
in amazonlinux2023_gcc11x_aarch_valgrind.
  • Loading branch information
nebeid committed Jul 25, 2024
1 parent 97bee82 commit 1e5fc83
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crypto/fipsmodule/aes/aes_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 1e5fc83

Please sign in to comment.