[openssl-commits] [openssl] master update

Paul I. Dale pauli at openssl.org
Mon Nov 5 21:07:41 UTC 2018


The branch master has been updated
       via  2087028612027368e9508e1b253aab715a5a35d6 (commit)
       via  e931f370aa38d8645b35fb8d6260cb44d37b6b61 (commit)
      from  38cfa99122f5c34b25e1671639be4446d0fa2b15 (commit)


- Log -----------------------------------------------------------------
commit 2087028612027368e9508e1b253aab715a5a35d6
Author: Pauli <paul.dale at oracle.com>
Date:   Tue Nov 6 07:06:25 2018 +1000

    Fix return formatting.
    
    Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre at ncp-e.com>
    (Merged from https://github.com/openssl/openssl/pull/7564)

commit e931f370aa38d8645b35fb8d6260cb44d37b6b61
Author: Pauli <paul.dale at oracle.com>
Date:   Mon Nov 5 11:04:23 2018 +1000

    Cleanse the key log buffer.
    
    Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre at ncp-e.com>
    (Merged from https://github.com/openssl/openssl/pull/7564)

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

Summary of changes:
 ssl/ssl_lib.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index 846b856..e7e8aa9 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -5104,7 +5104,8 @@ static int nss_keylog_int(const char *prefix,
     size_t i;
     size_t prefix_len;
 
-    if (ssl->ctx->keylog_callback == NULL) return 1;
+    if (ssl->ctx->keylog_callback == NULL)
+        return 1;
 
     /*
      * Our output buffer will contain the following strings, rendered with
@@ -5115,7 +5116,7 @@ static int nss_keylog_int(const char *prefix,
      * hexadecimal, so we need a buffer that is twice their lengths.
      */
     prefix_len = strlen(prefix);
-    out_len = prefix_len + (2*parameter_1_len) + (2*parameter_2_len) + 3;
+    out_len = prefix_len + (2 * parameter_1_len) + (2 * parameter_2_len) + 3;
     if ((out = cursor = OPENSSL_malloc(out_len)) == NULL) {
         SSLfatal(ssl, SSL_AD_INTERNAL_ERROR, SSL_F_NSS_KEYLOG_INT,
                  ERR_R_MALLOC_FAILURE);
@@ -5139,7 +5140,7 @@ static int nss_keylog_int(const char *prefix,
     *cursor = '\0';
 
     ssl->ctx->keylog_callback(ssl, (const char *)out);
-    OPENSSL_free(out);
+    OPENSSL_clear_free(out, out_len);
     return 1;
 
 }


More information about the openssl-commits mailing list