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

spec: Does Block_Maximum_Size apply for RAW/RLE blocks? #3072

Closed
klauspost opened this issue Feb 21, 2022 · 2 comments
Closed

spec: Does Block_Maximum_Size apply for RAW/RLE blocks? #3072

klauspost opened this issue Feb 21, 2022 · 2 comments
Labels

Comments

@klauspost
Copy link

Describe the bug

While fuzz testing my Go port, I came across this input that I can decompress, but cli cannot.

The input has an RLE block of 1572321 bytes. The cli fails with Destination buffer is too small and extended error is check regenSize > dstCapacity failed, returning ERROR(dstSize_tooSmall).

Reading spec I want to confirm my (new) reading is correct;

Does the Block_Size is limited by Block_Maximum_Size (see below) mean that no matter the block type, the limit of Window Size/128KB applies? I kind of read/assumed that other types could use up to the 21 bits available.

@Cyan4973
Copy link
Contributor

Indeed,
the Block_Maximum_Size is applicable to all block types, including RLE and RAW.

@klauspost
Copy link
Author

Thanks. Just wanted to confirm before adding the restriction locally.

klauspost added a commit to klauspost/compress that referenced this issue Feb 22, 2022
Clean up error returns to cancel when context is cancelled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants