forked from wolfSSL/wolfssl
sp_int.c: fix refactor of undefined-semantics shift in _sp_mul().
This commit is contained in:
@ -7277,7 +7277,7 @@ static int _sp_mul(sp_int* a, sp_int* b, sp_int* r)
|
||||
#endif
|
||||
for (k = 1; k <= (a->used - 1) + (b->used - 1); k++) {
|
||||
i = k - (b->used - 1);
|
||||
i &= ~((unsigned int)i >> (sizeof(i) * 8 - 1));
|
||||
i &= (((unsigned int)i >> (sizeof(i) * 8 - 1)) - 1U);
|
||||
j = k - i;
|
||||
for (; (i < a->used) && (j >= 0); i++, j--) {
|
||||
w = (sp_int_word)a->dp[i] * b->dp[j];
|
||||
|
Reference in New Issue
Block a user