From ac5f2b98e7ce63db87325ea600327d05dd0cc56c Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Sat, 27 Jun 2026 14:41:44 -0500 Subject: [PATCH] wolfcrypt/src/wc_slhdsa.c: * disable asm accelerations if WC_SHA3_NO_ASM is set. * fix an uninited-data warning in slhdsakey_wots_pkgen_chain_c(). --- wolfcrypt/src/wc_slhdsa.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wolfcrypt/src/wc_slhdsa.c b/wolfcrypt/src/wc_slhdsa.c index 7dd6a71753..4d24d5ff96 100644 --- a/wolfcrypt/src/wc_slhdsa.c +++ b/wolfcrypt/src/wc_slhdsa.c @@ -49,7 +49,7 @@ #include #endif -#ifdef WC_SLHDSA_NO_ASM +#if defined(WC_SLHDSA_NO_ASM) || defined(WC_SHA3_NO_ASM) #undef USE_INTEL_SPEEDUP #undef WOLFSSL_ARMASM #undef WOLFSSL_RISCV_ASM @@ -3283,6 +3283,8 @@ static int slhdsakey_wots_pkgen_chain_c(SlhDsaKey* key, const byte* sk_seed, WC_ALLOC_VAR_EX(sk, byte, (SLHDSA_MAX_MSG_SZ + 3) * SLHDSA_MAX_N, key->heap, DYNAMIC_TYPE_SLHDSA, ret = MEMORY_E); + if (ret == 0) + XMEMSET(sk, 0, (SLHDSA_MAX_MSG_SZ + 3) * SLHDSA_MAX_N); if (ret == 0) { /* Step 4. len consecutive addresses. */ for (i = 0; i < len; i++) {