From: Dmitry Karpov Date: Wed, 13 Dec 2023 22:32:53 +0000 (-0800) Subject: cookie: avoid fopen with empty file name X-Git-Tag: curl-8_6_0~227 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1e4cd519355b63b26a0a9ee1f125153bfcc4995e;p=thirdparty%2Fcurl.git cookie: avoid fopen with empty file name Closes #12514 --- diff --git a/lib/cookie.c b/lib/cookie.c index 1bd80ff5b3..5f158395b6 100644 --- a/lib/cookie.c +++ b/lib/cookie.c @@ -1227,7 +1227,7 @@ struct CookieInfo *Curl_cookie_init(struct Curl_easy *data, if(data) { FILE *fp = NULL; - if(file) { + if(file && *file) { if(!strcmp(file, "-")) fp = stdin; else {