gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnurl] 48/73: mime: fix the content reader to handle >16K


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 48/73: mime: fix the content reader to handle >16K data properly
Date: Tue, 24 Oct 2017 18:54:29 +0200

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

ng0 pushed a commit to branch master
in repository gnurl.

commit 5f9e2ca09b57d82baf239039835b3b06dc41bbc5
Author: Daniel Stenberg <address@hidden>
AuthorDate: Fri Oct 13 00:13:41 2017 +0200

    mime: fix the content reader to handle >16K data properly
    
    Reported-by: Jeroen Ooms
    Closes #1988
---
 lib/mime.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/mime.c b/lib/mime.c
index 1868336ca..c337a35c9 100644
--- a/lib/mime.c
+++ b/lib/mime.c
@@ -620,14 +620,13 @@ static size_t mime_mem_read(char *buffer, size_t size, 
size_t nitems,
 {
   curl_mimepart *part = (curl_mimepart *) instream;
   size_t sz = (size_t) part->datasize - part->state.offset;
-
   (void) size;   /* Always 1.*/
 
   if(sz > nitems)
     sz = nitems;
 
   if(sz)
-    memcpy(buffer, (char *) part->data, sz);
+    memcpy(buffer, (char *) &part->data[part->state.offset], sz);
 
   part->state.offset += sz;
   return sz;

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



reply via email to

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