Skip to content

Commit 8e91e6a

Browse files
committed
initialize values used by unsigned bin
1 parent bdc1f89 commit 8e91e6a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

wolfcrypt/src/sp_int.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18077,6 +18077,9 @@ int sp_read_unsigned_bin(sp_int* a, const byte* in, word32 inSz)
1807718077
a->dp[j++] = *(sp_int_digit*)(in + i - (SP_WORD_SIZEOF - 1));
1807818078
}
1807918079
#else
18080+
for (i = 0; i < (int)a->used; i++) {
18081+
a->dp[i] = 0;
18082+
}
1808018083
/* Construct digit from required number of bytes. */
1808118084
for (i = (int)(inSz-1); i >= SP_WORD_SIZEOF - 1; i -= SP_WORD_SIZEOF) {
1808218085
a->dp[j] = ((sp_int_digit)in[i - 0] << 0)

0 commit comments

Comments
 (0)