From: Steve Holme Date: Sun, 22 Dec 2013 00:16:52 +0000 (+0000) Subject: email: Fixed segfault introduced in commit 195b63f99c2fe3 X-Git-Tag: curl-7_35_0~202 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cf2051764c5acd745fb4693e9be78e89fb5dd0b5;p=thirdparty%2Fcurl.git email: Fixed segfault introduced in commit 195b63f99c2fe3 --- diff --git a/lib/imap.c b/lib/imap.c index 1666a5cf8f..e4185a3a15 100644 --- a/lib/imap.c +++ b/lib/imap.c @@ -2314,7 +2314,7 @@ static CURLcode imap_parse_url_options(struct connectdata *conn) const char *ptr = options; bool reset = TRUE; - while(*ptr) { + while(ptr && *ptr) { const char *key = ptr; while(*ptr && *ptr != '=') diff --git a/lib/pop3.c b/lib/pop3.c index d3f5a3d859..2fc4e4e889 100644 --- a/lib/pop3.c +++ b/lib/pop3.c @@ -1834,7 +1834,7 @@ static CURLcode pop3_parse_url_options(struct connectdata *conn) const char *ptr = options; bool reset = TRUE; - while(*ptr) { + while(ptr && *ptr) { const char *key = ptr; while(*ptr && *ptr != '=') diff --git a/lib/smtp.c b/lib/smtp.c index dd26f7b8e2..936320377b 100644 --- a/lib/smtp.c +++ b/lib/smtp.c @@ -1929,7 +1929,7 @@ static CURLcode smtp_parse_url_options(struct connectdata *conn) const char *ptr = options; bool reset = TRUE; - while(*ptr) { + while(ptr && *ptr) { const char *key = ptr; while(*ptr && *ptr != '=')