mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +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)) {
|
||||
err = MP_VAL;
|
||||
}
|
||||
else if (a->size < m->used * 2 + 1) {
|
||||
err = MP_VAL;
|
||||
}
|
||||
else {
|
||||
err = _sp_mont_red(a, m, mp);
|
||||
}
|
||||
|
Reference in New Issue
Block a user