From: Bernd Edlinger Date: Fri, 30 Mar 2018 17:13:06 +0000 (+0200) Subject: Clear buffer in PEM_write_bio X-Git-Tag: OpenSSL_1_1_1-pre6~75 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c9c56ee50139a143797e12563a1668df02f99c5a;p=oweals%2Fopenssl.git Clear buffer in PEM_write_bio Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5814) --- diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c index 830099295c..6e66e9d3e9 100644 --- a/crypto/pem/pem_lib.c +++ b/crypto/pem/pem_lib.c @@ -661,7 +661,7 @@ int PEM_write_bio(BIO *bp, const char *name, const char *header, if (retval == 0) PEMerr(PEM_F_PEM_WRITE_BIO, reason); EVP_ENCODE_CTX_free(ctx); - OPENSSL_free(buf); + OPENSSL_clear_free(buf, PEM_BUFSIZE * 8); return retval; }