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

XZ: fix padding issues #300

Merged
merged 4 commits into from Sep 17, 2017
Merged

XZ: fix padding issues #300

merged 4 commits into from Sep 17, 2017

Conversation

@frabar666
Copy link
Contributor

@frabar666 frabar666 commented Sep 17, 2017

SkipPadding in XZBlock and XZIndex did not always skip the right number of bytes:

  • block padding size computation used decompressed instead of compressed bytes,
  • and both were wrong for even numbers of bytes (skipped 1 when they should have skipped 3, and vice-versa).

This PR fixes both SkipPadding methods, resolves #289 and resolves #296.
I added unit tests using two new inline XZ files (an empty one, and one with 2 blocks), in order to test more cases.

Note that this relies on my previous PR #299: I created a new branch on top of the one I used for the previous PR, not sure if that was the right way to go...

frabar666 and others added 4 commits Sep 16, 2017
@adamhathcock adamhathcock merged commit 3d91b4e into adamhathcock:master Sep 17, 2017
0 of 2 checks passed
0 of 2 checks passed
continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build failed
Details
@frabar666 frabar666 deleted the frabar666:fix-padding branch Sep 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants
You can’t perform that action at this time.