gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnurl] 68/73: imap: if a FETCH response has no size, don't


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 68/73: imap: if a FETCH response has no size, don't call write callback
Date: Tue, 24 Oct 2017 18:54:49 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository gnurl.

commit 13c9a9ded3ae744a1e11cbc14e9146d9fa427040
Author: Daniel Stenberg <address@hidden>
AuthorDate: Sat Oct 7 00:11:31 2017 +0200

    imap: if a FETCH response has no size, don't call write callback
    
    CVE-2017-1000257
    
    Reported-by: Brian Carpenter and 0xd34db347
    Also detected by OSS-Fuzz: 
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3586
---
 lib/imap.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/imap.c b/lib/imap.c
index 954d18f37..baa31a2f8 100644
--- a/lib/imap.c
+++ b/lib/imap.c
@@ -1126,6 +1126,11 @@ static CURLcode imap_state_fetch_resp(struct connectdata 
*conn, int imapcode,
         /* The conversion from curl_off_t to size_t is always fine here */
         chunk = (size_t)size;
 
+      if(!chunk) {
+        /* no size, we're done with the data */
+        state(conn, IMAP_STOP);
+        return CURLE_OK;
+      }
       result = Curl_client_write(conn, CLIENTWRITE_BODY, pp->cache, chunk);
       if(result)
         return result;

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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