# HG changeset patch # User Matt Johnston # Date 1279719187 0 # Node ID a55b97f5a4856e5343cd89b22e3bb3722cca1ef5 # Parent 1151059c5eff0c74ddef4f8f2403332706735d2e Fix bug in primality testing, see http://bugs.gentoo.org/show_bug.cgi?id=328383 http://bugs.gentoo.org/show_bug.cgi?id=328409 https://bugzilla.redhat.com/show_bug.cgi?id=615088 Exact effects of the bug are uncertain. diff -r 1151059c5eff -r a55b97f5a485 libtommath/bn_mp_prime_next_prime.c --- a/libtommath/bn_mp_prime_next_prime.c Wed Jul 21 13:27:44 2010 +0000 +++ b/libtommath/bn_mp_prime_next_prime.c Wed Jul 21 13:33:07 2010 +0000 @@ -143,7 +143,7 @@ /* is this prime? */ for (x = 0; x < t; x++) { - mp_set(&b, ltm_prime_tab[t]); + mp_set(&b, ltm_prime_tab[x]); if ((err = mp_prime_miller_rabin(a, &b, &res)) != MP_OKAY) { goto LBL_ERR; }