Skip to content

Fix zip entry handling for entries with data descriptors#891

Merged
adamhathcock merged 5 commits intoadamhathcock:masterfrom
Morilli:fix-zip-datadescriptor-header
Jan 28, 2025
Merged

Fix zip entry handling for entries with data descriptors#891
adamhathcock merged 5 commits intoadamhathcock:masterfrom
Morilli:fix-zip-datadescriptor-header

Conversation

@Morilli
Copy link
Contributor

@Morilli Morilli commented Jan 28, 2025

See the included test for how this issue surfaces. The missing fields in the local header will now be set from the directory header if the UsePostDataDescriptor bit is set in the local header's flags.

As described in section 4.4.7-4.4.9 of the zip specification when this flag is set the correct values will be in the data descriptor record and in the directory header.
Introduced in af264cd; the test included in that commit passes still.
@Morilli
Copy link
Contributor Author

Morilli commented Jan 28, 2025

Test failures are unrelated and are due to the ubuntu runner using 24.04 instead of 22.04 which no longer ships with mono.

@adamhathcock
Copy link
Owner

Thanks for this. I didn't mean to be executing legacy framework tests on ubuntu.

@adamhathcock adamhathcock merged commit 8d63ab6 into adamhathcock:master Jan 28, 2025
2 checks passed
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.

ZIP archive file entries with an "data descriptor structure" will confuse ZipReader

2 participants

Comments