[openssl-commits] [openssl] master update

Matt Caswell matt at openssl.org
Tue Aug 23 19:19:37 UTC 2016

The branch master has been updated
       via  986dbbbeffb0f998aa1e9aa80d24ddb4d10d0f73 (commit)
      from  cdb2a60347f988037d29adc7e4415e9c66c8a5a5 (commit)

- Log -----------------------------------------------------------------
commit 986dbbbeffb0f998aa1e9aa80d24ddb4d10d0f73
Author: Rob Percival <robpercival at google.com>
Date:   Tue Aug 23 16:55:09 2016 +0100

    Prevent double-free of CTLOG public key
    Previously, if ct_v1_log_id_from_pkey failed, public_key would be freed by
    CTLOG_free at the end of the function, and then again by the caller (who
    would assume ownership was not transferred when CTLOG_new returned NULL).
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    Reviewed-by: Matt Caswell <matt at openssl.org>


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

diff --git a/crypto/ct/ct_log.c b/crypto/ct/ct_log.c
index 13f7f39..6db4c3e 100644
--- a/crypto/ct/ct_log.c
+++ b/crypto/ct/ct_log.c
@@ -247,10 +247,10 @@ CTLOG *CTLOG_new(EVP_PKEY *public_key, const char *name)
         goto err;
-    ret->public_key = public_key;
     if (ct_v1_log_id_from_pkey(public_key, ret->log_id) != 1)
         goto err;
+    ret->public_key = public_key;
     return ret;

More information about the openssl-commits mailing list