mirror of
https://github.com/google/brotli.git
synced 2026-07-08 17:56:58 +00:00
[PR #635] [MERGED] Fix brotlidump.py crashing when complex prefix code has exactly 1 non-zero code length #1285
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?
📋 Pull Request Information
Original PR: https://github.com/google/brotli/pull/635
Author: @chylex
Created: 2/8/2018
Status: ✅ Merged
Merged: 2/8/2018
Merged by: @eustas
Base:
master← Head:brotlidump-fix📝 Commits (1)
42955f8Fix brotlidump.py crashing when complex prefix code has exactly 1 non-zero code length📊 Changes
1 file changed (+4 additions, -3 deletions)
View changed files
📝
research/brotlidump.py(+4 -3)📄 Description
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.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.