-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
minizip: Fix ZIPReader
failing to open empty zip files
#73310
Merged
Merged
Conversation
This file contains 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
Is this a fix for the upstream madler/zlib#199 ? |
Upstream PR: madler/zlib#778 |
akien-mga
approved these changes
Jun 19, 2023
Thanks! |
akien-mga
added a commit
to akien-mga/godot
that referenced
this pull request
Aug 29, 2023
Upstreams the fix from godotengine#73310, so we can remove that patch. Remove `infback.c` which we stopped compiling after godotengine#79273. The `OF` macro was also removed so I can drop the patch where I yell at Gentoo developers.
mandryskowski
pushed a commit
to mandryskowski/godot
that referenced
this pull request
Oct 11, 2023
Upstreams the fix from godotengine#73310, so we can remove that patch. Remove `infback.c` which we stopped compiling after godotengine#79273. The `OF` macro was also removed so I can drop the patch where I yell at Gentoo developers.
YuriSizov
added
the
cherrypick:4.1
Considered for cherry-picking into a future 4.1.x release
label
Oct 24, 2023
Cherry-picked for 4.1.3 (not needed, technically, but makes cherry-picking #81111 much easier). |
YuriSizov
removed
the
cherrypick:4.1
Considered for cherry-picking into a future 4.1.x release
label
Oct 24, 2023
YuriSizov
pushed a commit
to YuriSizov/godot
that referenced
this pull request
Oct 24, 2023
Upstreams the fix from godotengine#73310, so we can remove that patch. Remove `infback.c` which we stopped compiling after godotengine#79273. The `OF` macro was also removed so I can drop the patch where I yell at Gentoo developers. (cherry picked from commit e0e1f2e)
akien-mga
changed the title
Fix
minizip: Fix Nov 29, 2023
ZIPReader
failing to open empty zip filesZIPReader
failing to open empty zip files
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.
Fixes #73271
The problem is that minizip uses the offset
0
to mark the failure to find the central directory of the zip file, but if the zip file is empty the central directory is the only thing left in the file, so actually is located at offset 0.This makes it use
0xffffffffffffffff
(max value of an unsigned 64bit integer likeZPOS64_T
) instead, which truly cannot be a valid as if the 20 byte structure were to start there it would immediately overflow the offset variable. (Also thats a 16EB file, what are you storing?)