Skip to content

Commit 43ffd5e

Browse files
committed
initialize i_shaCopy to prevent undefined behavior
1 parent 16e45f9 commit 43ffd5e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

wolfcrypt/test/test.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4863,6 +4863,9 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t sha256_test(void)
48634863
#endif
48644864

48654865
XMEMSET(&shaCopy, 0, sizeof(shaCopy));
4866+
#ifndef NO_WOLFSSL_SHA256_INTERLEAVE
4867+
XMEMSET(&i_shaCopy, 0, sizeof(i_shaCopy));
4868+
#endif
48664869

48674870
for (i = 0; i < times; ++i) {
48684871
ret = wc_Sha256Update(&sha, (byte*)test_sha[i].input,

0 commit comments

Comments
 (0)