diff options
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | dpi/https.c | 5 |
2 files changed, 4 insertions, 2 deletions
@@ -18,6 +18,7 @@ dillo-2.2.1 [not released yet] - Fix segfault with form inputs and repush for stylesheets. - Handle white-space: pre-wrap and pre-line. - Support for the word-spacing property. + - Fix segfault with https and self-signed certificates. Patches: corvid +- Implement line-height. Patch: Johannes Hofmann, corvid diff --git a/dpi/https.c b/dpi/https.c index e9bf7b5f..d6a16405 100644 --- a/dpi/https.c +++ b/dpi/https.c @@ -452,10 +452,11 @@ static int handle_certificate_problem(SSL * ssl_connection) case X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: /*Either self signed and untrusted*/ /*Extract CN from certificate name information*/ - cn = strstr(remote_cert->name, "/CN=") + 4; - if (cn == NULL) + if ((cn = strstr(remote_cert->name, "/CN=")) == NULL) break; + cn += 4; + if ((cn_end = strstr(cn, "/")) == NULL ) cn_end = cn + strlen(cn); |