mirror of
https://github.com/google/brotli.git
synced 2026-09-23 07:05:31 +00:00
[PR #635] Fix brotlidump.py crashing when complex prefix code has exactly 1 non-zero code length #1289
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/google/brotli/pull/635
State: closed
Merged: Yes
According to the format specification regarding complex prefix codes:
The script does not handle a case where there is just 1 non-zero code
length where the sum rule doesn't apply, which causes a StopIteration
exception when it attempts to read past the list boundaries.
An example of such file is tests/testdata/mapsdatazrh.compressed. I made
sure this change doesn't break anything by processing all *.compressed
files from the testdata folder with no thrown exceptions.