New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

brotli: data at the end of content can be lost #2194

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@3dyd
Contributor

3dyd commented Dec 25, 2017

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 value. For content with not encoded length greater than CURL_MAX_WRITE_SIZE this can result in the loss of data at the end of content.


I am not sure if the test for bug fix is welcome. It is also tied to CURL_MAX_WRITE_SIZE being set to 16384 and makes no sense if this value is greater.

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 value. For content with not encoded length greater than CURL_MAX_WRITE_SIZE this can result in the loss of data at the end of content.
@monnerat

This comment has been minimized.

Show comment
Hide comment
@monnerat

monnerat Dec 27, 2017

Collaborator

You're perfectly right. Many thanks for fix.

Collaborator

monnerat commented Dec 27, 2017

You're perfectly right. Many thanks for fix.

@monnerat monnerat closed this in 58d7cd2 Dec 27, 2017

@lock lock bot locked as resolved and limited conversation to collaborators May 9, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.