aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/imap.c2
-rw-r--r--lib/pop3.c2
-rw-r--r--lib/smtp.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/imap.c b/lib/imap.c
index 1666a5cf8..e4185a3a1 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 d3f5a3d85..2fc4e4e88 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 dd26f7b8e..936320377 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 != '=')