]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
don't segfault when NULL is passed in to CURLOPT_USERPWD or
authorDaniel Stenberg <daniel@haxx.se>
Thu, 16 Oct 2008 20:43:02 +0000 (20:43 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 16 Oct 2008 20:43:02 +0000 (20:43 +0000)
CURLOPT_PROXYUSERPWD

lib/url.c

index b385e2deeecf20cd6c8b1e53a60800efbfb96908..da6d871f8e93071edd57d3e05afe4dc2b1f13a33 100644 (file)
--- 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) {