Skip to content

Commit e227b2a

Browse files
committed
wolfcrypt/src/sp_int.c: fix bugprone-too-small-loop-variable in _sp_mul().
1 parent 5b8e9e6 commit e227b2a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

wolfcrypt/src/sp_int.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9390,7 +9390,7 @@ static int _sp_mul(const sp_int* a, const sp_int* b, sp_int* r)
93909390
#ifdef SP_WORD_OVERFLOW
93919391
o = 0;
93929392
#endif
9393-
for (k = 1; k <= (a->used - 1) + (b->used - 1); k++) {
9393+
for (k = 1; (int)k <= ((int)a->used - 1) + ((int)b->used - 1); k++) {
93949394
i = k - (sp_size_t)(b->used - 1);
93959395
i &= (sp_size_t)(((unsigned int)i >> (sizeof(i) * 8 - 1)) - 1U);
93969396
j = (int)(k - i);

0 commit comments

Comments
 (0)