projects
/
privoxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1a70173
)
ssl_store_cert(): Handle html_encode() failures
author
Fabian Keil
<fk@fabiankeil.de>
Wed, 26 Aug 2020 13:45:47 +0000
(15:45 +0200)
committer
Fabian Keil
<fk@fabiankeil.de>
Tue, 1 Sep 2020 10:22:42 +0000
(12:22 +0200)
Sponsored by: Robert Klemme
openssl.c
patch
|
blob
|
history
diff --git
a/openssl.c
b/openssl.c
index
6cc2af5
..
723820b
100644
(file)
--- a/
openssl.c
+++ b/
openssl.c
@@
-638,6
+638,14
@@
static int ssl_store_cert(struct client_state *csp, X509* crt)
len = BIO_get_mem_data(bio, &bio_mem_data);
encoded_text = html_encode(bio_mem_data);
+ if (encoded_text == NULL)
+ {
+ log_error(LOG_LEVEL_ERROR,
+ "Failed to HTML-encode the certificate information");
+ ret = -1;
+ goto exit;
+ }
+
strlcpy(last->info_buf, encoded_text, sizeof(last->info_buf));
freez(encoded_text);
ret = 0;