forked from wolfSSL/wolfssl
fixed mp_add_d overflow
This commit is contained in:
@ -3792,8 +3792,10 @@ int mp_add_d (mp_int* a, mp_digit b, mp_int* c)
|
|||||||
*tmpc++ &= MP_MASK;
|
*tmpc++ &= MP_MASK;
|
||||||
}
|
}
|
||||||
/* set final carry */
|
/* set final carry */
|
||||||
ix++;
|
if (mu != 0 && ix < c->alloc) {
|
||||||
*tmpc++ = mu;
|
ix++;
|
||||||
|
*tmpc++ = mu;
|
||||||
|
}
|
||||||
|
|
||||||
/* setup size */
|
/* setup size */
|
||||||
c->used = a->used + 1;
|
c->used = a->used + 1;
|
||||||
|
Reference in New Issue
Block a user