Curl_cookie_output() must check that there's a cookie struct present before
authorDaniel Stenberg <daniel@haxx.se>
Mon, 10 Sep 2001 07:43:08 +0000 (07:43 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 10 Sep 2001 07:43:08 +0000 (07:43 +0000)
trying to address it!

lib/cookie.c

index f17f39c..f859b0b 100644 (file)
@@ -600,7 +600,7 @@ int Curl_cookie_output(struct CookieInfo *c, char *dumphere)
   FILE *out;
   bool use_stdout=FALSE;
 
-  if(0 == c->numcookies)
+  if((NULL == c) || (0 == c->numcookies))
     /* If there are no known cookies, we don't write or even create any
        destination file */
     return 0;