[openssl-commits] [openssl] master update

Andy Polyakov appro at openssl.org
Tue May 8 10:44:56 UTC 2018


The branch master has been updated
       via  7d859d1c8868b81c5d810021af0b40f355af4e1f (commit)
      from  61e96557f9eae0258074c9cec7ad6aa1b9dde1df (commit)


- Log -----------------------------------------------------------------
commit 7d859d1c8868b81c5d810021af0b40f355af4e1f
Author: Andy Polyakov <appro at openssl.org>
Date:   Mon May 7 10:27:45 2018 +0200

    ec/ec_mult.c: get BN_CTX_start,end sequence right.
    
    Triggered by Coverity analysis.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/6190)

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

Summary of changes:
 crypto/ec/ec_mult.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/crypto/ec/ec_mult.c b/crypto/ec/ec_mult.c
index 4f6689a..6b5553c 100644
--- a/crypto/ec/ec_mult.c
+++ b/crypto/ec/ec_mult.c
@@ -140,7 +140,9 @@ static int ec_mul_consttime(const EC_GROUP *group, EC_POINT *r,
     int ret = 0;
 
     if (ctx == NULL && (ctx = new_ctx = BN_CTX_secure_new()) == NULL)
-        goto err;
+        return 0;
+
+    BN_CTX_start(ctx);
 
     order_bits = BN_num_bits(group->order);
 
@@ -158,7 +160,6 @@ static int ec_mul_consttime(const EC_GROUP *group, EC_POINT *r,
 
     EC_POINT_BN_set_flags(s, BN_FLG_CONSTTIME);
 
-    BN_CTX_start(ctx);
     lambda = BN_CTX_get(ctx);
     k = BN_CTX_get(ctx);
     if (k == NULL)


More information about the openssl-commits mailing list