aboutsummaryrefslogtreecommitdiff
path: root/crypto/bn
diff options
context:
space:
mode:
authorDavid Asraf <dasraf9@gmail.com>2019-01-23 11:10:11 +0000
committerMatt Caswell <matt@openssl.org>2019-01-27 12:12:50 +0000
commit3d43f9c809e42b960be94f2f4490d6d14e063486 (patch)
tree5f4047ff44525feb2dd67272db1a6594feb6f472 /crypto/bn
parent5478e2100260b8d6f9df77de875f37763d8eeec6 (diff)
downloadopenssl-3d43f9c809e42b960be94f2f4490d6d14e063486.zip
openssl-3d43f9c809e42b960be94f2f4490d6d14e063486.tar.gz
openssl-3d43f9c809e42b960be94f2f4490d6d14e063486.tar.bz2
crypto/bn: fix return value in BN_generate_prime
When the ret parameter is NULL the generated prime is in rnd variable and not in ret. CLA: trivial Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8076)
Diffstat (limited to 'crypto/bn')
-rw-r--r--crypto/bn/bn_depr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/bn/bn_depr.c b/crypto/bn/bn_depr.c
index 705ca1e..2ff0eed 100644
--- a/crypto/bn/bn_depr.c
+++ b/crypto/bn/bn_depr.c
@@ -40,7 +40,7 @@ BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe,
goto err;
/* we have a prime :-) */
- return ret;
+ return rnd;
err:
BN_free(rnd);
return NULL;