[openssl-commits] [openssl] master update

kaduk at mit.edu kaduk at mit.edu
Fri Jun 22 18:01:54 UTC 2018


The branch master has been updated
       via  5295b99b5606e3502b9af06a2cf54acf2187a34a (commit)
      from  09fb65d5e413b7b87bf26f01ec441b44a03d4ee2 (commit)


- Log -----------------------------------------------------------------
commit 5295b99b5606e3502b9af06a2cf54acf2187a34a
Author: Benjamin Kaduk <kaduk at mit.edu>
Date:   Sun Jun 17 20:00:02 2018 -0500

    ecdsa_ossl: address coverity nit
    
    BN_CTX_end() does not handle NULL input, so we must manually check
    before calling from the cleanup handler.
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/6502)

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

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

diff --git a/crypto/ec/ecdsa_ossl.c b/crypto/ec/ecdsa_ossl.c
index 277ac16..dfb0d19 100644
--- a/crypto/ec/ecdsa_ossl.c
+++ b/crypto/ec/ecdsa_ossl.c
@@ -336,7 +336,8 @@ ECDSA_SIG *ossl_ecdsa_sign_sig(const unsigned char *dgst, int dgst_len,
         ECDSA_SIG_free(ret);
         ret = NULL;
     }
-    BN_CTX_end(ctx);
+    if (ctx != NULL)
+        BN_CTX_end(ctx);
     BN_CTX_free(ctx);
     BN_clear_free(kinv);
     return ret;


More information about the openssl-commits mailing list