From 3f5227dfc7389f008137a6f4703af8022ab862f3 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 10 Sep 2001 07:43:08 +0000 Subject: [PATCH] Curl_cookie_output() must check that there's a cookie struct present before trying to address it! --- lib/cookie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cookie.c b/lib/cookie.c index f17f39c83..f859b0bee 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;