]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
prevent strdup()ing NULL -- Paul Harrington's report
authorDaniel Stenberg <daniel@haxx.se>
Tue, 30 Oct 2001 12:08:17 +0000 (12:08 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 30 Oct 2001 12:08:17 +0000 (12:08 +0000)
lib/cookie.c

index bac0adb2fc11605d77a9b4cb3b89decc9d723d6e..697081117da765e497c4d13b5b085c5fb6b0a908 100644 (file)
@@ -198,7 +198,7 @@ Curl_cookie_add(struct CookieInfo *c,
 
     if(NULL == co->domain)
       /* no domain given in the header line, set the default now */
-      co->domain=strdup(domain);
+      co->domain=domain?strdup(domain):NULL;
   }
   else {
     /* This line is NOT a HTTP header style line, we do offer support for