aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPatrick Monnerat <patrick@monnerat.net>2020-03-07 12:00:56 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-03-07 23:26:15 +0100
commite5b366c0b5ff1796a7b86a721ee572cdc3dda0f2 (patch)
tree32bfe8035534f19b5bc65fe64087dfc0ed6e4fd8 /lib
parent1e4cb333ef632bf081045bb7b36f0736bec52708 (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 Closes #4833 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;