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 empty-block.zst golden decompression file #3483

Merged
merged 1 commit into from
Feb 8, 2023

Conversation

terrelln
Copy link
Contributor

@terrelln terrelln commented Feb 8, 2023

This frame is invalid because the Window_Size = 0, and the Block_Maximum_Size = min(128 KB, Window_Size) = 0. But the empty compressed block has a Block_Content size of 2, which is invalid.

The fix is to switch to using a Window_Descriptor instead of the Single_Segment_Flag. This sets the Window_Size = 1024.

Hexdump before this PR: 28b5 2ffd 2000 1500 0000 00

Hexdump after this PR: 28b5 2ffd 0000 1500 0000 00

For issue #3482.

This frame is invalid because the `Window_Size = 0`, and the
`Block_Maximum_Size = min(128 KB, Window_Size) = 0`. But the empty
compressed block has a `Block_Content` size of 2, which is invalid.

The fix is to switch to using a `Window_Descriptor` instead of the
`Single_Segment_Flag`. This sets the `Window_Size = 1024`.

Hexdump before this PR: `28b5 2ffd 2000 1500 0000 00`

Hexdump after this PR: `28b5 2ffd 0000 1500 0000 00`

For issue facebook#3482.
@terrelln terrelln merged commit 83f8a05 into facebook:dev Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants