From b2caaa0681f329eed317ffb6ae6927f4a539f0c1 Mon Sep 17 00:00:00 2001 From: Patrick Monnerat Date: Wed, 29 Jan 2020 05:30:08 +0100 Subject: 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 --- lib/mime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/mime.c') 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; -- cgit v1.2.3