]> granicus.if.org Git - curl/commit
brotli: data at the end of content can be lost
authorMikalai Ananenka <git@3dyd.com>
Mon, 25 Dec 2017 21:17:08 +0000 (00:17 +0300)
committerPatrick Monnerat <patrick@monnerat.net>
Wed, 27 Dec 2017 12:00:54 +0000 (13:00 +0100)
commit58d7cd28a0d8306c91be6ea393d861b92165402f
tree91e00b94f4e3fc4c43460e771f672b67b22f6a5f
parenta0f3eaf25dd2c4acf1f49d28d5de4f1765521709
brotli: data at the end of content can be lost

Decoding loop implementation did not concern the case when all
received data is consumed by Brotli decoder and the size of decoded
data internally hold by Brotli decoder is greater than CURL_MAX_WRITE_SIZE.
For content with unencoded length greater than CURL_MAX_WRITE_SIZE this
can result in the loss of data at the end of content.

Closes #2194
lib/content_encoding.c
tests/data/Makefile.inc
tests/data/test316 [new file with mode: 0644]