[PR #115] Bug fixes for the brotli encoder. #727

Open
opened 2026-01-29 20:50:34 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/google/brotli/pull/115

State: closed
Merged: Yes


  • Fix an out-of-bounds access to depth_histo in the
    bit cost calculation function.
  • Change type of distance symbol to uint16_t in block
    splitter, because if all postfix bits are used, there
    can be 520 distance symbols.
  • Save the distance cache between meta-blocks at the
    correct place. This fixes a roundtrip failure that
    can occur when there is an uncompressed metablock
    between two compressed metablocks.
  • Fix a bug when setting lgwin to 24 in the encoder parameters
    It ended up making metablocks larger than 24 bits in size.
  • Fix out-of-bounds memory accesses in parallel encoder.
    CreateBackwardReferences can read up to 4 bytes past end of
    input if the end of input is before mask.
  • Add missing header for memcpy() in port.h
**Original Pull Request:** https://github.com/google/brotli/pull/115 **State:** closed **Merged:** Yes --- - Fix an out-of-bounds access to depth_histo in the bit cost calculation function. - Change type of distance symbol to uint16_t in block splitter, because if all postfix bits are used, there can be 520 distance symbols. - Save the distance cache between meta-blocks at the correct place. This fixes a roundtrip failure that can occur when there is an uncompressed metablock between two compressed metablocks. - Fix a bug when setting lgwin to 24 in the encoder parameters It ended up making metablocks larger than 24 bits in size. - Fix out-of-bounds memory accesses in parallel encoder. CreateBackwardReferences can read up to 4 bytes past end of input if the end of input is before mask. - Add missing header for memcpy() in port.h
claunia added the pull-request label 2026-01-29 20:50:34 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#727