diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c index a11f0277c..5439253d9 100644 --- a/src/main.c +++ b/src/main.c @@ -1049,7 +1049,11 @@ static int str2offset(curl_off_t *val, char *str) static void checkpasswd(const char *kind, /* for what purpose */ char **userpwd) /* pointer to allocated string */ { - char *ptr = strchr(*userpwd, ':'); + char *ptr; + if(!*userpwd) + return; + + ptr = strchr(*userpwd, ':'); if(!ptr) { /* no password present, prompt for one */ char passwd[256]=""; |