mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
SP int: mont_red - check size of a relative to m
This commit is contained in:
@ -12246,6 +12246,9 @@ int sp_mont_red(sp_int* a, sp_int* m, sp_int_digit mp)
|
|||||||
if ((a == NULL) || (m == NULL) || sp_iszero(m)) {
|
if ((a == NULL) || (m == NULL) || sp_iszero(m)) {
|
||||||
err = MP_VAL;
|
err = MP_VAL;
|
||||||
}
|
}
|
||||||
|
else if (a->size < m->used * 2 + 1) {
|
||||||
|
err = MP_VAL;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
err = _sp_mont_red(a, m, mp);
|
err = _sp_mont_red(a, m, mp);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user