Skip to content
Snippets Groups Projects
Commit 35eb9fc6 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

avoid possible NULL dereference caused by my previous fix

parent df09088a
No related branches found
No related tags found
No related merge requests found
......@@ -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");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment