Repository navigation
Fix swapped XFL and OS bytes in igzip_threaded gzip headers - #322
Merged
rhpvorderman merged 2 commits intoNov 6, 2026
Merged
Conversation
RFC 1952 puts XFL before OS. The threaded writer packed OS first, so file(1) reported its output as from VM/CMS or a FAT file system.
Collaborator
|
Good spot. Yes the OS byte should be last! |
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.
When
threadsis not 0 (the default is 1),igzip_threaded.open()writes the XFL and OS bytes of the gzip header in the wrong order. Bytes 8 and 9 areff 04at level 0 andff 00at levels 1 to 3, whereIGzipFilewrites04 ffand00 ff. The output still decompresses, but thefilecommand reports it as coming from VM/CMS or a FAT file system. This change passesxflbeforeostostruct.pack()in_write_gzip_header(), the order RFC 1952 gives. The new testtest_threaded_write_header_xfl_osfails on develop.Checklist