From 8e91e6a94986c6cc21f7e8ae57d779f989830a1d Mon Sep 17 00:00:00 2001 From: Ruby Martin Date: Mon, 8 Sep 2025 15:50:02 -0600 Subject: [PATCH] initialize values used by unsigned bin --- wolfcrypt/src/sp_int.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wolfcrypt/src/sp_int.c b/wolfcrypt/src/sp_int.c index 5a8222a522..94b0281455 100644 --- a/wolfcrypt/src/sp_int.c +++ b/wolfcrypt/src/sp_int.c @@ -18077,6 +18077,9 @@ int sp_read_unsigned_bin(sp_int* a, const byte* in, word32 inSz) a->dp[j++] = *(sp_int_digit*)(in + i - (SP_WORD_SIZEOF - 1)); } #else + for (i = 0; i < (int)a->used; i++) { + a->dp[i] = 0; + } /* Construct digit from required number of bytes. */ for (i = (int)(inSz-1); i >= SP_WORD_SIZEOF - 1; i -= SP_WORD_SIZEOF) { a->dp[j] = ((sp_int_digit)in[i - 0] << 0)