From d870740cd75dd4f0cb66fb8c32653a7d47369706 Mon Sep 17 00:00:00 2001 From: Geoff Thorpe Date: Tue, 4 Nov 2003 22:54:49 +0000 Subject: Put the first stage of my bignum debugging adventures into CVS. This code is itself experimental, and in addition may cause execution to break on existing openssl "bugs" that previously were harmless or at least invisible. --- crypto/bn/bn_rand.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'crypto/bn/bn_rand.c') diff --git a/crypto/bn/bn_rand.c b/crypto/bn/bn_rand.c index 480817a4b6..de5a1f0c63 100644 --- a/crypto/bn/bn_rand.c +++ b/crypto/bn/bn_rand.c @@ -204,6 +204,7 @@ err: OPENSSL_cleanse(buf,bytes); OPENSSL_free(buf); } + bn_check_top(rnd); return(ret); } @@ -290,6 +291,7 @@ static int bn_rand_range(int pseudo, BIGNUM *r, BIGNUM *range) while (BN_cmp(r, range) >= 0); } + bn_check_top(r); return 1; } -- cgit v1.2.3