X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=ssl.c;h=1eb6e827d6538676e86466a1bb883175cb312431;hp=30b6f583e70e65feea1f6e17908697aaec9a1229;hb=7c7eac4808f49d1b7bba67ade896788d25f7baa6;hpb=0cbd0e80bb1b4a44a11995ba3a5fd0e4757c1694 diff --git a/ssl.c b/ssl.c index 30b6f583..1eb6e827 100644 --- 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); }