projects
/
privoxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d972b9
)
ssl_verify_callback(): Handle html_encode() failures
author
Fabian Keil
<fk@fabiankeil.de>
Wed, 26 Aug 2020 13:45:08 +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
ssl.c
patch
|
blob
|
history
diff --git
a/ssl.c
b/ssl.c
index
30b6f58
..
1eb6e82
100644
(file)
--- a/
ssl.c
+++ b/
ssl.c
@@
-1726,6
+1726,12
@@
static int ssl_verify_callback(void *csp_void, mbedtls_x509_crt *crt,
mbedtls_x509_crt_info(buf, sizeof(buf), CERT_INFO_PREFIX, crt);
encoded_text = html_encode(buf);
+ if (encoded_text == NULL)
+ {
+ log_error(LOG_LEVEL_ERROR,
+ "Failed to HTML-encode the certificate information");
+ return -1;
+ }
strlcpy(last->info_buf, encoded_text, sizeof(last->info_buf));
freez(encoded_text);
}