ecmult: Clean up integer types in _ecmult_wnaf#1795
Conversation
Left-shifting an int32_t by 31 may be signed overflow
903cb9e to
242df7f
Compare
|
Concept ACK. |
| int bit = 0; | ||
| int sign = 1; | ||
| int carry = 0; | ||
| size_t last_set_bit = -1; |
There was a problem hiding this comment.
nit: maybe
| size_t last_set_bit = -1; | |
| size_t last_set_bit = SIZE_MAX; |
(that's what we use in secp256k1_ge_set_all_gej_var, fwiw)
|
Concept ACK on moving these to explicit widths — the Two observations, one of which I think deserves a mention in the commit message. The
|
Fixes #1769.
On top of #1794.