From 9fd8f2b45aa12c501da99d429a8b06ea5449195f Mon Sep 17 00:00:00 2001 From: Anthony Hu Date: Thu, 20 Aug 2026 16:21:54 -0400 Subject: [PATCH] Macro guard to prevent dead code. --- wolfcrypt/src/asn.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index 5b48f90caf..6312e4a3da 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -34188,8 +34188,11 @@ int wc_EccPublicKeyDecode(const byte* input, word32* inOutIdx, } ALLOC_ASNGETDATA(dataASN, eccKeyASN_Length, ret, key->heap); +#ifdef WOLFSSL_SMALL_STACK + /* Only the small stack variant of ALLOC_ASNGETDATA can set ret. */ if (ret != 0) return ret; +#endif /* Clear dynamic data for ECC public key. */ XMEMSET(dataASN, 0, sizeof(*dataASN) * eccPublicKeyASN_Length);