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

Ensure output files are zip64-compliant (again) #114

Merged
merged 1 commit into from
Jul 3, 2023
Merged

Conversation

chenxiaolong
Copy link
Owner

PR #110 fixed this incorrectly. I misinterpreted "set to zero in the local header" from §4.4.4 in the spec as referring to the two 32-bit size fields in the local header. However, the spec considers the zip64 extra record as part of the local header. The correct behavior for writing zip64 entries to unseekable files is 0xffffffff in the 32-bit local header size fields (to enable zip64), 0 in the zip64 extra record (due to streaming writes), and the actual sizes in the data descriptor.

Fixes: #109

PR #110 fixed this incorrectly. I misinterpreted "set to zero in the
local header" from §4.4.4 in the spec as referring to the two 32-bit
size fields in the local header. However, the spec considers the zip64
extra record as part of the local header. The correct behavior for
writing zip64 entries to unseekable files is 0xffffffff in the 32-bit
local header size fields (to enable zip64), 0 in the zip64 extra record
(due to streaming writes), and the actual sizes in the data descriptor.

Fixes: #109

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
@chenxiaolong chenxiaolong self-assigned this Jul 3, 2023
@chenxiaolong chenxiaolong merged commit 7d2a103 into master Jul 3, 2023
@chenxiaolong chenxiaolong deleted the zip branch July 3, 2023 22:19
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.

ossi --stripped tests are producing files with a different checksum
1 participant