X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=openssl.c;h=723820bf0d0c6579933fa3ae4eb91d8c1197c2df;hp=6cc2af55b5a99a46270a734853598e020fd44ae5;hb=b987797ccc0276de1f36b8175ce105950d5e97eb;hpb=1a70173d7f1e3ac1e9bf678bd602537a06e0f406 diff --git a/openssl.c b/openssl.c index 6cc2af55..723820bf 100644 --- 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;