aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2009-08-03 14:07:57 +0000
committerDaniel Stenberg <daniel@haxx.se>2009-08-03 14:07:57 +0000
commit35eb9fc6ad300fa67845d48bdd0c71e9b350f760 (patch)
tree2f8261b5583902601b14ccb3fea08bb567bbc2c3 /lib
parentdf09088a966d6c599f4edf7d8c0546f9b31be250 (diff)
avoid possible NULL dereference caused by my previous fix
Diffstat (limited to 'lib')
-rw-r--r--lib/ssluse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ssluse.c b/lib/ssluse.c
index 0b98ba0b6..07824b411 100644
--- a/lib/ssluse.c
+++ b/lib/ssluse.c
@@ -1178,7 +1178,7 @@ static CURLcode verifyhost(struct connectdata *conn,
else /* not a UTF8 name */
j = ASN1_STRING_to_UTF8(&peer_CN, tmp);
- if((int)strlen((char *)peer_CN) != j) {
+ if(peer_CN && ((int)strlen((char *)peer_CN) != j)) {
/* there was a terminating zero before the end of string, this
cannot match and we return failure! */
failf(data, "SSL: illegal cert name field");