Skip to content
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

Fix block_open handling in deflate_quick() #880

Merged
merged 1 commit into from
Mar 17, 2021

Commits on Mar 17, 2021

  1. Fix block_open handling in deflate_quick()

    The attached test fails with "inflate() failed", because the deflate
    stream that it produces ends up being corrupted. Bisect points to the
    commit e7bb6db ("Replace hash_bits, hash_size and hash_mask with
    defines."), but it's most likely a coincidence.
    
    In any case, the reason is that if we happen to simultaneously exhaust
    all the buffers (in, out and bi), we return finish_started without
    writing the end of block symbol, which will never happen afterwards.
    
    Fix by adding another check to the tricky condition: if we are in the
    middle of a block, return need_more instead of finish_started.
    iii-i committed Mar 17, 2021
    Configuration menu
    Copy the full SHA
    2f770ff View commit details
    Browse the repository at this point in the history