[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 119/151: altsvc: make the save function ignore NULL filenames
From: |
gnunet |
Subject: |
[gnurl] 119/151: altsvc: make the save function ignore NULL filenames |
Date: |
Fri, 20 Dec 2019 14:27:08 +0100 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 5dc56eb95d1a5d9ac4c35d1ad038d98731decab2
Author: Daniel Stenberg <address@hidden>
AuthorDate: Thu Dec 12 10:48:57 2019 +0100
altsvc: make the save function ignore NULL filenames
It might happen in OOM situations. Detected bv torture tests.
Closes #4707
---
lib/altsvc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/altsvc.c b/lib/altsvc.c
index 28c9276b1..bf869c37a 100644
--- a/lib/altsvc.c
+++ b/lib/altsvc.c
@@ -320,8 +320,8 @@ CURLcode Curl_altsvc_save(struct altsvcinfo *altsvc, const
char *file)
/* no cache activated */
return CURLE_OK;
- if((altsvc->flags & CURLALTSVC_READONLYFILE) || !file[0])
- /* marked as read-only or zero length file name */
+ if((altsvc->flags & CURLALTSVC_READONLYFILE) || !file || !file[0])
+ /* marked as read-only, no file or zero length file name */
return CURLE_OK;
out = fopen(file, FOPEN_WRITETEXT);
if(!out)
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 98/151: curl: make the etag load logic work without fseek, (continued)
- [gnurl] 98/151: curl: make the etag load logic work without fseek, gnunet, 2019/12/20
- [gnurl] 103/151: winbuild: Define CARES_STATICLIB when WITH_CARES=static, gnunet, 2019/12/20
- [gnurl] 90/151: test342: make it return a 304 as the tag matches, gnunet, 2019/12/20
- [gnurl] 99/151: azure: add a vanilla macos build, gnunet, 2019/12/20
- [gnurl] 105/151: tests: fix permissions of ssh keys in WSL, gnunet, 2019/12/20
- [gnurl] 102/151: conn: always set bits.close with connclose(), gnunet, 2019/12/20
- [gnurl] 116/151: curl: improved cleanup in upload error path, gnunet, 2019/12/20
- [gnurl] 108/151: azure: add libssh2 and cmake macos builds, gnunet, 2019/12/20
- [gnurl] 107/151: curl: use errorf() better, gnunet, 2019/12/20
- [gnurl] 114/151: travis: make torture use --shallow=40, gnunet, 2019/12/20
- [gnurl] 119/151: altsvc: make the save function ignore NULL filenames,
gnunet <=
- [gnurl] 118/151: curl: fix memory leak in OOM in etags logic, gnunet, 2019/12/20
- [gnurl] 123/151: unit1609: fix mem-leak in OOM, gnunet, 2019/12/20
- [gnurl] 125/151: cirrus: Drop the FreeBSD 10.4 build, gnunet, 2019/12/20
- [gnurl] 96/151: docs: fix some typos, gnunet, 2019/12/20
- [gnurl] 94/151: lib: fix some loose ends for recently added CURLSSLOPT_NO_PARTIALCHAIN, gnunet, 2019/12/20
- [gnurl] 89/151: CMake: add support for building with the NSS vtls backend, gnunet, 2019/12/20
- [gnurl] 101/151: cirrus: enable clang sanitizers on freebsd 13, gnunet, 2019/12/20
- [gnurl] 110/151: RELEASE-NOTES: synced, gnunet, 2019/12/20
- [gnurl] 112/151: conncache: CONNECT_ONLY connections assumed always in-use, gnunet, 2019/12/20
- [gnurl] 115/151: mailmap: fix Andrew Ishchuk, gnunet, 2019/12/20