additional bugfixes

This commit is contained in:
czurnieden 2018-12-12 00:18:22 +01:00 committed by Steffen Jaeckel
parent 3ec93dab9e
commit 09133c9349
2 changed files with 2 additions and 2 deletions

View File

@ -248,7 +248,7 @@ int mp_prime_is_prime(const mp_int *a, int t, int *result)
* Hence the ugly type-fiddling in the following code.
*/
size_a = mp_count_bits(a);
mask = (1u << floor_ilog2(size_a)) - 1u;
mask = (1u << s_floor_ilog2(size_a)) - 1u;
/*
Assuming the General Rieman hypothesis (never thought to write that in a
comment) the upper bound can be lowered to 2*(log a)^2.

View File

@ -294,7 +294,7 @@ int mp_prime_strong_lucas_selfridge(const mp_int *a, int *result)
if ((e = mp_mul(&U2mz,&Uz,&T4z)) != MP_OKAY) {
goto LBL_LS_ERR;
}
if ((e = mp_mul_si(&T4z,(long)Ds,&T4z)) != MP_OKAY) {
if ((e = s_mp_mul_si(&T4z,(long)Ds,&T4z)) != MP_OKAY) {
goto LBL_LS_ERR;
}
if ((e = mp_add(&T1z,&T2z,&Uz)) != MP_OKAY) {