Skip to content

Commit 7ba6f83

Browse files
authored
Merge pull request #8972 from SparkiDev/sp_int_8_bit_fix
SP int: fix 8 bit words and sp_clamp_ct
2 parents c3518e4 + f0041cd commit 7ba6f83

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

wolfcrypt/src/sp_int.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8025,8 +8025,8 @@ static void sp_clamp_ct(sp_int* a)
80258025
(sp_int_digit)((sp_int_sdigit)(negVal & minusOne) >>
80268026
(SP_WORD_SIZE - 1));
80278027
#else
8028-
sp_int_digit zeroMask =
8029-
(sp_int_digit)((((sp_int_sword)a->dp[i]) - 1) >> SP_WORD_SIZE);
8028+
sp_size_t zeroMask =
8029+
(sp_size_t)((((sp_int_sword)a->dp[i]) - 1) >> SP_WORD_SIZE);
80308030
#endif
80318031
mask &= (sp_size_t)zeroMask;
80328032
used = (sp_size_t)(used + mask);

0 commit comments

Comments
 (0)