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
This commit is contained in:
Patrick Monnerat 2020-03-07 12:00:56 +01:00 committed by Daniel Stenberg
parent 1e4cb333ef
commit e5b366c0b5
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
6 changed files with 423 additions and 4 deletions

View file

@ -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;