From: Daniel Stenberg Date: Mon, 10 Sep 2001 07:43:08 +0000 (+0000) Subject: Curl_cookie_output() must check that there's a cookie struct present before X-Git-Tag: upstream/7.37.1~16334 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3f5227dfc7389f008137a6f4703af8022ab862f3;p=platform%2Fupstream%2Fcurl.git Curl_cookie_output() must check that there's a cookie struct present before trying to address it! --- diff --git a/lib/cookie.c b/lib/cookie.c index f17f39c..f859b0b 100644 --- a/lib/cookie.c +++ b/lib/cookie.c @@ -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;