fix missing check of return value

This commit is contained in:
Steffen Jaeckel 2018-12-26 13:16:15 +01:00
parent bd14983023
commit d29916b4c5

View File

@ -335,7 +335,9 @@ int mp_prime_is_prime(const mp_int *a, int t, int *result)
len = mp_count_bits(&b); len = mp_count_bits(&b);
if (len > size_a) { if (len > size_a) {
len = len - size_a; len = len - size_a;
mp_div_2d(&b, len, &b, NULL); if ((err = mp_div_2d(&b, len, &b, NULL)) != MP_OKAY) {
goto LBL_B;
}
} }
/* Although the chance for b <= 3 is miniscule, try again. */ /* Although the chance for b <= 3 is miniscule, try again. */