From 7a894515cb941eadbd014b1440259f050d419bae Mon Sep 17 00:00:00 2001 From: Zackery Backman Date: Thu, 15 Jan 2026 18:00:27 -0700 Subject: [PATCH] initialize i_shaCopy to prevent undefined behavior --- wolfcrypt/test/test.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index 6d53f4bc6..9d4eb4af4 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -4863,6 +4863,9 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t sha256_test(void) #endif XMEMSET(&shaCopy, 0, sizeof(shaCopy)); +#ifndef NO_WOLFSSL_SHA256_INTERLEAVE + XMEMSET(&i_shaCopy, 0, sizeof(i_shaCopy)); +#endif for (i = 0; i < times; ++i) { ret = wc_Sha256Update(&sha, (byte*)test_sha[i].input,