From: Daniel Stenberg Date: Thu, 16 Oct 2008 20:43:02 +0000 (+0000) Subject: don't segfault when NULL is passed in to CURLOPT_USERPWD or X-Git-Tag: curl-7_19_1~130 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=54582bdce9c551d50759c9ed6a092644485806ad;p=thirdparty%2Fcurl.git don't segfault when NULL is passed in to CURLOPT_USERPWD or CURLOPT_PROXYUSERPWD --- diff --git a/lib/url.c b/lib/url.c index b385e2deee..da6d871f8e 100644 --- a/lib/url.c +++ b/lib/url.c @@ -286,6 +286,9 @@ static CURLcode setstropt_userpwd(char *option, char **user_storage, char* separator; CURLcode result = CURLE_OK; + if(!option) + return result; + separator = strchr(option, ':'); if (separator != NULL) {