[openssl-commits] [openssl] master update

Rich Salz rsalz at openssl.org
Mon Apr 24 13:50:30 UTC 2017


The branch master has been updated
       via  26fb4b033c664df7e220db1960f1cdad73bbba06 (commit)
      from  cb2a6eb76ef7304a1b76ac5e2578cd9d5f59af28 (commit)


- Log -----------------------------------------------------------------
commit 26fb4b033c664df7e220db1960f1cdad73bbba06
Author: Rich Salz <rsalz at openssl.org>
Date:   Mon Apr 24 09:41:51 2017 -0400

    if log fails, avoid pms getting double free
    
    doing the pms assignment after log is successful
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    Reviewed-by: Matt Caswell <matt at openssl.org>
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/3278)

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

Summary of changes:
 ssl/statem/statem_clnt.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ssl/statem/statem_clnt.c b/ssl/statem/statem_clnt.c
index 8207dde..a8bb566 100644
--- a/ssl/statem/statem_clnt.c
+++ b/ssl/statem/statem_clnt.c
@@ -2854,13 +2854,13 @@ static int tls_construct_cke_rsa(SSL *s, WPACKET *pkt, int *al)
         goto err;
     }
 
-    s->s3->tmp.pms = pms;
-    s->s3->tmp.pmslen = pmslen;
-
     /* Log the premaster secret, if logging is enabled. */
     if (!ssl_log_rsa_client_key_exchange(s, encdata, enclen, pms, pmslen))
         goto err;
 
+    s->s3->tmp.pms = pms;
+    s->s3->tmp.pmslen = pmslen;
+
     return 1;
  err:
     OPENSSL_clear_free(pms, pmslen);


More information about the openssl-commits mailing list