Skip to content

Commit 05c84bc

Browse files
Merge pull request #10908 from LinuxJedi/valgrind-fixes
Fix a couple of Valgrind hits
2 parents 9d86960 + 8066fbc commit 05c84bc

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

tests/api/test_aes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9188,7 +9188,7 @@ int test_wc_AesGcmArgMcdc(void)
91889188
/* ---- wc_AesGcmDecryptFinal(): nonceSet AND ---- */
91899189
{
91909190
Aes aes;
9191-
byte tag[WC_AES_BLOCK_SIZE];
9191+
byte tag[WC_AES_BLOCK_SIZE] = { 0 };
91929192

91939193
XMEMSET(&aes, 0, sizeof(aes));
91949194
ExpectIntEQ(wc_AesInit(&aes, NULL, INVALID_DEVID), 0);

wolfcrypt/test/test.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12526,7 +12526,7 @@ static wc_test_ret_t des_key_wrap_test(void)
1252612526
{
1252712527
0x12,0x34,0x56,0x78,0x90,0xab,0xcd,0xef
1252812528
};
12529-
byte cipher[24];
12529+
byte cipher[24] = { 0 };
1253012530
EncryptedInfo info;
1253112531
wc_test_ret_t ret;
1253212532

@@ -12783,7 +12783,7 @@ static wc_test_ret_t des3_key_wrap_test(void)
1278312783
0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
1278412784
0x11,0x21,0x31,0x41,0x51,0x61,0x71,0x81
1278512785
};
12786-
byte cipher[24];
12786+
byte cipher[24] = { 0 };
1278712787
EncryptedInfo info;
1278812788
wc_test_ret_t ret;
1278912789

0 commit comments

Comments
 (0)