Fixes #1769.
On top of #1794.
Left-shifting an int32_t by 31 may be signed overflow
Concept ACK.
164 | secp256k1_scalar s; 165 | - int last_set_bit = -1; 166 | - int bit = 0; 167 | - int sign = 1; 168 | - int carry = 0; 169 | + size_t last_set_bit = -1;
nit: maybe
size_t last_set_bit = SIZE_MAX;
(that's what we use in secp256k1_ge_set_all_gej_var, fwiw)
Concept ACK