summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Gustafsson <daniel@yesql.se>2022-04-20 14:17:29 +0200
committerDaniel Gustafsson <daniel@yesql.se>2022-04-20 14:17:29 +0200
commita6cdfd24eed5778da4d080e7c139a00ba9282ca0 (patch)
treeb69d79b49ad8c369f84197beea938b34888d0ae7 /scripts
parentd794d4bce24f8850a4f09e6d6f4ebc38b73a65d0 (diff)
downloadcurl-a6cdfd24eed5778da4d080e7c139a00ba9282ca0.tar.gz
cookies: Improve errorhandling for reading cookiefile
The existing programming had some issues with errorhandling for reading the cookie file. If the file failed to open, we would silently ignore it and continue as if there was no file (or stdin) passed. In this case, we would also call fclose() on the NULL FILE pointer, which is undefined behavior. Fix by ensuring that the FILE pointer is set before calling fclose on it, and issue a warning in case the file cannot be opened. Erroring out on nonexisting file would break backwards compatibility of very old behavior so we can't really go there. Closes: #8699 Reviewed-by: Daniel Stenberg <daniel@haxx.se> Reviewed-by: Jay Satiro <raysatiro@yahoo.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions