aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hcrypto
diff options
context:
space:
mode:
authorStanislav Sedov <stas@FreeBSD.org>2012-04-08 04:47:53 +0000
committerStanislav Sedov <stas@FreeBSD.org>2012-04-08 04:47:53 +0000
commitfeec3621854ef6b1ccd3598df2202c0622929444 (patch)
treeba2f151899a171234df9949cf23e5f8a9bd43bb7 /lib/hcrypto
parent813b7899c1cf9c5cd1b72c0fb7c6c740aab26929 (diff)
downloadsrc-feec3621854ef6b1ccd3598df2202c0622929444.tar.gz
src-feec3621854ef6b1ccd3598df2202c0622929444.zip
- Update vendor tree of heimdal to 1.5.2.vendor/heimdal/1.5.2
Notes
Notes: svn path=/vendor-crypto/heimdal/dist/; revision=234016 svn path=/vendor-crypto/heimdal/1.5.2/; revision=234017; tag=vendor/heimdal/1.5.2
Diffstat (limited to 'lib/hcrypto')
-rw-r--r--lib/hcrypto/libtommath/bn_mp_prime_next_prime.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/hcrypto/libtommath/bn_mp_prime_next_prime.c b/lib/hcrypto/libtommath/bn_mp_prime_next_prime.c
index a2897f087846..db2f46ddbf9b 100644
--- a/lib/hcrypto/libtommath/bn_mp_prime_next_prime.c
+++ b/lib/hcrypto/libtommath/bn_mp_prime_next_prime.c
@@ -142,8 +142,8 @@ int mp_prime_next_prime(mp_int *a, int t, int bbs_style)
}
/* is this prime? */
- for (x = 0; x < t; x++) {
- mp_set(&b, ltm_prime_tab[t]);
+ for (x = 0; x < t && x < PRIME_SIZE; x++) {
+ mp_set(&b, ltm_prime_tab[x]);
if ((err = mp_prime_miller_rabin(a, &b, &res)) != MP_OKAY) {
goto LBL_ERR;
}