RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v12]

Jaikiran Pai jpai at openjdk.org
Tue Jan 16 14:58:58 UTC 2024


On Tue, 16 Jan 2024 14:41:06 GMT, Eirik Bjørsnøs <eirbjo at openjdk.org> wrote:

> The spec isn't terribly helpful in spelling out what should happen in the case where an entry combines the uses of data descriptors (mandating that CRC, size and compressed size must be zero) with Zip64 (mandating that size and compressed size must be 0xFFFFFFFF)

I see what you mean. However, given that the data descriptor general bit field is set to indicate that the data descriptor should be honoured, plus the spec stating that the original/compressed sizes in the zip64 extra block aren't mandatory, I think not relying on the zip64 extra block for parsing decisions about a data descriptor content might be better. I think the only role that a zip64 block should play when we are deciding how to parse a data descriptor is whether or not the entry has zip64 extra field set (the header id value of the extra field). Does that sound reasonable?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/12524#discussion_r1453546995


More information about the core-libs-dev mailing list