You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a ZipFile using on iOS with password for example Moduli.zip (Password DEDALUS)
Extract the previous file
Expected behavior
Extract the contained file
Actual behavior
Throw ZipException "Size invalid for descriptor"
Version of SharpZipLib
1.3.3 but also verified against master
Obtained from (only keep the relevant lines)
Compiled from source
Package installed using NuGet 1.3.3
I think that the condition size != -1 in the method TestLocalHeader is wrong. but must be size > 0. In my case the value of size is 0 and also compressedSize value is 0.
The text was updated successfully, but these errors were encountered:
Hm, yeah, I think you are right. The correct local header value for an entry with a descriptor ought to be 0, not -1. The only mention of -1 (or rather "all bits set", 0xFFFFFFFF) is for the Zip64 indicator. https://p1k.se/appnote.md#s439-data-descriptor
The question is, why has this not been a problem for other files? There might be a "de facto" standard of putting -1 in the field, or it's just that the combination of reading an archive with Zip64 and descriptors using ZipFile is rare enough for this not to have been a problem?
Steps to reproduce
Moduli.zip (Password DEDALUS)
Expected behavior
Extract the contained file
Actual behavior
Throw ZipException "Size invalid for descriptor"
Version of SharpZipLib
1.3.3 but also verified against master
Obtained from (only keep the relevant lines)
I think that the condition size != -1 in the method TestLocalHeader is wrong. but must be size > 0. In my case the value of size is 0 and also compressedSize value is 0.
The text was updated successfully, but these errors were encountered: