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 & refactor Huffman repeat tables for dictionaries #3737

Merged
merged 1 commit into from
Aug 25, 2023

Commits on Aug 25, 2023

  1. Fix & refactor Huffman repeat tables for dictionaries

    The Huffman repeat mode checker assumed that the CTable was zeroed in the region `[maxSymbolValue + 1, 256)`.
    This assumption didn't hold for tables built in the dictionaries, because it didn't go through the same codepath.
    
    Since this code was originally written, we added a header to the CTable that specifies the `tableLog`.
    Add `maxSymbolValue` to that header, and check that the table's `maxSymbolValue` is at least the block's `maxSymbolValue`.
    
    This solution is cleaner because we write this header for every CTable we build, so it can't be missed in any code path.
    
    Credit to OSS-Fuzz
    Nick Terrell committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    671c157 View commit details
    Browse the repository at this point in the history