From c9c56ee50139a143797e12563a1668df02f99c5a Mon Sep 17 00:00:00 2001 From: Bernd Edlinger Date: Fri, 30 Mar 2018 19:13:06 +0200 Subject: [PATCH] Clear buffer in PEM_write_bio Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5814) --- crypto/pem/pem_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.25.1