diff options
author | Pauli <paul.dale@oracle.com> | 2018-11-05 11:04:23 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2018-11-06 07:06:56 +1000 |
commit | e931f370aa38d8645b35fb8d6260cb44d37b6b61 (patch) | |
tree | d58a4b5c8bdb13e784309f39c69ed22a9ae93e4e /ssl | |
parent | 38cfa99122f5c34b25e1671639be4446d0fa2b15 (diff) | |
download | openssl-e931f370aa38d8645b35fb8d6260cb44d37b6b61.tar.gz |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 846b856af4..485e17e73b 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; } |