-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Open
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Description
This is related to #40354, but a bit different.
Construct a zip file containing a file where:
- The central directory record contains a compressed file size of S1.
- The local file header gives a contains a compressed file size of 0.
- Bit 3 of the local file header's flag bit is 0.
Info-Zip's UnZip will prefer the local file header (extracting a file of size 0), but archive/zip will prefer the central directory record (extracting S1 compressed bytes).
PKWARE's spec says about bit 3 of the local file header flags:
Bit 3: If this bit is set, the fields crc-32, compressed
size and uncompressed size are set to zero in the
local header. The correct values are put in the
data descriptor immediately following the compressed
data. (Note: PKZIP version 2.04g for DOS only
recognizes this bit for method 8 compression, newer
versions of PKZIP recognize this bit for any
compression method.)
I haven't attempted to check what other implementations do. (Actually, I'm not sure if bit 3 is relevant or not here, but the spec seems to indicate that it is.)
Metadata
Metadata
Assignees
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.