aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPatrick Monnerat <patrick@monnerat.net>2020-01-29 05:30:08 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-03-02 00:00:59 +0100
commitb2caaa0681f329eed317ffb6ae6927f4a539f0c1 (patch)
tree4b4bffa51ace56e703dc8f082b5af50a79d7dd8f /lib
parented0f357f7d25566110d4302f33759f4ffb5a6f83 (diff)
mime: fix the binary encoder to handle large data properly
New test 666 checks this is effective. As upload buffer size is significant in this kind of tests, shorten it in similar test 652. Fixes #4860 Reported-by: RuurdBeerstra on github
Diffstat (limited to 'lib')
-rw-r--r--lib/mime.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/mime.c b/lib/mime.c
index 7d754e63b..b72732310 100644
--- a/lib/mime.c
+++ b/lib/mime.c
@@ -366,7 +366,7 @@ static size_t encoder_nop_read(char *buffer, size_t size, bool ateof,
size = insize;
if(size)
- memcpy(buffer, st->buf, size);
+ memcpy(buffer, st->buf + st->bufbeg, size);
st->bufbeg += size;
return size;