cookie: avoid fopen with empty file name

Closes #12514
This commit is contained in:
Dmitry Karpov 2023-12-13 14:32:53 -08:00 committed by Daniel Stenberg
parent 246e0d805a
commit 1e4cd51935
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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 {