zipfile regression: When writing a zip64 entry to an unseekable file, the local file header compressed/uncompressed fields are not set to 0 #106218
Labels
type-bug
An unexpected behavior, bug, or error
Bug report
When creating a zip file with a zip64 entry in a streaming way (unseekable file), my understanding from the spec is that the headers should be set up so that:
0x0001
) extra record so that data descriptor sizes are interpreted as 64-bit integers (§4.3.9.2)zipfile
normally does all this, but (2) seems to have broken after #103861/#103863. With that change, the local file header's compressed and uncompressed sizes are set to0xffffffff
instead of0x00000000
. (0xffffffff
is correct for the usual case where files are seekable and data descriptors are not used.)From initial testing, it seems like this is all that's needed to fix the issue:
To reproduce
The resulting file looks like this, as reported by zipdetails (green=good, red=problematic).
Your environment
The text was updated successfully, but these errors were encountered: