[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
- [GNUnet-SVN] [gnurl] 07/73: darwinssl: add support for TLSv1.3, (continued)
- [GNUnet-SVN] [gnurl] 07/73: darwinssl: add support for TLSv1.3, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 03/73: failf: skip the sprintf() if there are no consumers, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 26/73: test643: verify curl_mime_subparts() rejects cyclic additions., gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 35/73: test298: verify --ftp-method nowcwd with URL encoded path, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 20/73: mime: be tolerant about setting twice the same header list in a part., gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 12/73: multi_cleanup: call DONE on handles that never got that, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 01/73: RELEASE-PROCEDURE: update the release schedule, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 14/73: tests: added flaky keyword to tests 587 and 644, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 33/73: CURLOPT_NOPROGRESS.3: also refer to xferinfofunction, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 24/73: mime: avoid resetting a part's encoder when part's contents change., gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 48/73: mime: fix the content reader to handle >16K data properly,
gnunet <=
- [GNUnet-SVN] [gnurl] 43/73: HELP-US: the label "PR-welcome" is now renamed to "help wanted", gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 22/73: RELEASE-NOTES: synced with a4c1c75da30af1, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 39/73: test950; verify SMTP with custom request, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 30/73: curl: don't pass semicolons when parsing Content-Disposition, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 42/73: RELEASE-NOTES: synced with 5505df7d2, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 44/73: winbuild/BUILD.WINDOWS.txt: mention WITH_NGHTTP2, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 15/73: pingpong: return error when trying to send without connection, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 45/73: cli tool: reimplement stdin buffering in -F option., gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 67/73: ftp: reject illegal IP/port in PASV 227 response, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 54/73: ldap: silence clang warning, gnunet, 2017/10/24