[openssl-commits] [openssl] master update

Dr. Stephen Henson steve at openssl.org
Wed May 11 17:49:20 UTC 2016


The branch master has been updated
       via  2ab851b779a77d119e1677b2495b368a46d83eef (commit)
      from  5a22cf96a0a1c34968c0664f99b7ebb7ccf6ed75 (commit)


- Log -----------------------------------------------------------------
commit 2ab851b779a77d119e1677b2495b368a46d83eef
Author: Steven Valdez <svaldez at google.com>
Date:   Tue Mar 1 13:20:43 2016 -0500

    Adding missing BN_CTX_(start/end) in crypto/ec/ec_key.c
    
    RT#4363
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    Reviewed-by: Stephen Henson <steve at openssl.org>

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

Summary of changes:
 crypto/ec/ec_key.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/crypto/ec/ec_key.c b/crypto/ec/ec_key.c
index 31ed8a5..14909b0 100644
--- a/crypto/ec/ec_key.c
+++ b/crypto/ec/ec_key.c
@@ -399,8 +399,9 @@ int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key, BIGNUM *x,
     }
     ctx = BN_CTX_new();
     if (ctx == NULL)
-        goto err;
+        return 0;
 
+    BN_CTX_start(ctx);
     point = EC_POINT_new(key->group);
 
     if (point == NULL)
@@ -455,6 +456,7 @@ int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key, BIGNUM *x,
     ok = 1;
 
  err:
+    BN_CTX_end(ctx);
     BN_CTX_free(ctx);
     EC_POINT_free(point);
     return ok;


More information about the openssl-commits mailing list