aboutsummaryrefslogtreecommitdiff
path: root/ssl
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2018-11-05 11:04:23 +1000
committerPauli <paul.dale@oracle.com>2018-11-06 07:06:56 +1000
commite931f370aa38d8645b35fb8d6260cb44d37b6b61 (patch)
treed58a4b5c8bdb13e784309f39c69ed22a9ae93e4e /ssl
parent38cfa99122f5c34b25e1671639be4446d0fa2b15 (diff)
downloadopenssl-e931f370aa38d8645b35fb8d6260cb44d37b6b61.zip
openssl-e931f370aa38d8645b35fb8d6260cb44d37b6b61.tar.gz
openssl-e931f370aa38d8645b35fb8d6260cb44d37b6b61.tar.bz2
Cleanse the key log buffer.
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/7564)
Diffstat (limited to 'ssl')
-rw-r--r--ssl/ssl_lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index 846b856..485e17e 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -5115,7 +5115,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 +5139,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;
}