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

Fix zip entry handling for entries with data descriptors #891

Merged

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