1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

prevent strdup()ing NULL -- Paul Harrington's report

This commit is contained in:
Daniel Stenberg 2001-10-30 12:08:17 +00:00
parent c046dc904c
commit 6d35984286

View File

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