[Privoxy-commits] [privoxy] 02/19: ssl_store_cert(): Check BIO_get_mem_data() return code
User Git
git at git.privoxy.org
Sun Jan 10 15:50:41 UTC 2021
This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository privoxy.
commit bf3617413ce8781d84af3b67bfcb4f59b59a40e7
Author: Fabian Keil <fk at fabiankeil.de>
AuthorDate: Tue Jan 5 01:12:04 2021 +0100
ssl_store_cert(): Check BIO_get_mem_data() return code
---
openssl.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/openssl.c b/openssl.c
index ecfb6bf8..e3717af5 100644
--- a/openssl.c
+++ b/openssl.c
@@ -654,6 +654,13 @@ static int ssl_store_cert(struct client_state *csp, X509* crt)
BIO_write(bio, &zero, 1);
len = BIO_get_mem_data(bio, &bio_mem_data);
+ if (len <= 0)
+ {
+ log_error(LOG_LEVEL_ERROR, "BIO_get_mem_data() returned %d "
+ "while gathering certificate information", len);
+ ret = -1;
+ goto exit;
+ }
encoded_text = html_encode(bio_mem_data);
if (encoded_text == NULL)
{
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Privoxy-commits
mailing list