Clear buffer in PEM_write_bio

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5814)
This commit is contained in:
Bernd Edlinger 2018-03-30 19:13:06 +02:00
parent c190506cd8
commit c9c56ee501

View File

@ -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;
}