The branch master has been updated
       via  3d43f9c809e42b960be94f2f4490d6d14e063486 (commit)
      from  5478e2100260b8d6f9df77de875f37763d8eeec6 (commit)


- Log -----------------------------------------------------------------
commit 3d43f9c809e42b960be94f2f4490d6d14e063486
Author: David Asraf <[email protected]>
Date:   Wed Jan 23 11:10:11 2019 +0000

    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 <[email protected]>
    Reviewed-by: Paul Dale <[email protected]>
    Reviewed-by: Matt Caswell <[email protected]>
    (Merged from https://github.com/openssl/openssl/pull/8076)

-----------------------------------------------------------------------

Summary of changes:
 crypto/bn/bn_depr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
_____
openssl-commits mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-commits

Reply via email to