From 6d35984286908e199e2ec9516ebbe322745bf2c2 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 30 Oct 2001 12:08:17 +0000 Subject: prevent strdup()ing NULL -- Paul Harrington's report --- lib/cookie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cookie.c b/lib/cookie.c index bac0adb2f..697081117 100644 --- a/lib/cookie.c +++ b/lib/cookie.c @@ -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 -- cgit v1.2.3