Repository navigation
Conversation
…ZMAFile Null bytes in multiples of four after an .xz stream are now skipped, so that a stream following them is decoded instead of ignored.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
lzma.decompress()andLZMAFilenow skip .xz stream padding (a run of null bytes whose size is a multiple of four) after a stream that starts with the .xz magic, and go on to decode the stream that follows; a damaged stream after the padding raises like any other damaged later stream. The skipping is done in the shared Python stream loop and turned on only bylzma, rather than withLZMA_CONCATENATEDin C, because that would need a new finish method onLZMADecompressorand would reject the mixed .xz/.lzma data thatFORMAT_AUTOdecodes today. A run of null bytes whose size is not a multiple of four is still handed to the decompressor as before, so nothing that decodes today starts to fail on that account, although the format specification says it is an error.FORMAT_ALONE,FORMAT_RAW,bz2andcompression.zstdare unchanged.Fixes #88300