gnunet-svn
[Top][All Lists]
Advanced

[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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]