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

decode/xz: fix block check method CRC32 #56

Merged
merged 1 commit into from
Aug 3, 2020

Conversation

lucab
Copy link
Contributor

@lucab lucab commented Jul 19, 2020

Pull Request Overview

This fixes the XZ decoder in order to properly extract and validate
the Block Check field when CRC32 is used.
This includes a testcase that was found in the wild and failing
to decompress.

Testing Strategy

This pull request was tested by...

  • Added relevant unit tests.
  • Added relevant end-to-end tests (such as .lzma, .lzma2, .xz files).

Supporting Documentation and References

The compressed testcase was part of a larger squashfs image using XZ for data compression.

@lucab
Copy link
Contributor Author

lucab commented Jul 25, 2020

CI here is red due to #57, I'll rebase this when the fix there is merged.

Copy link
Owner

@gendx gendx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! I left a couple comments, and also replied on #57 to unblock it.

tests/xz.rs Outdated Show resolved Hide resolved
tests/xz.rs Outdated Show resolved Hide resolved
tests/xz.rs Outdated Show resolved Hide resolved
tests/xz.rs Show resolved Hide resolved
src/decode/xz.rs Show resolved Hide resolved
src/decode/xz.rs Outdated Show resolved Hide resolved
src/decode/util.rs Outdated Show resolved Hide resolved
This fixes the XZ decoder in order to properly extract and validate
the Block Check field when CRC32 is used.
This includes a testcase that was found in the wild and failing
to decompress.
@lucab lucab force-pushed the ups/xz-block-check-crc32 branch from 6675bab to 6a99309 Compare July 31, 2020 13:31
@lucab
Copy link
Contributor Author

lucab commented Jul 31, 2020

Rebased!

@lucab lucab requested a review from gendx August 1, 2020 09:07
@gendx gendx merged commit 04503f3 into gendx:master Aug 3, 2020
@lucab lucab deleted the ups/xz-block-check-crc32 branch August 3, 2020 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants