changeset 588:a55b97f5a485

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.
author Matt Johnston <matt@ucc.asn.au>
date Wed, 21 Jul 2010 13:33:07 +0000
parents 1151059c5eff
children a34a6a2e7c72
files libtommath/bn_mp_prime_next_prime.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;
           }