RFR: JDK-8044727: Problem reading the contents of some zip files
xueming.shen at oracle.com
Wed Jun 4 19:30:30 UTC 2014
Please help review
Regression caused by the following changeset:
in which the new implementation of ZipInoutStream.writeLOC() incorrectly
tries to always interpret the ZIP64 extra data, if it "exists", even the size/csize
fields of the entry have "normal' size data. The original implementation only
does the check (and then setting), if at least one of the sizes (entry size and
compressed size) has the "zip64 magic value" (this is what the zip64 spec
says/requests the implementation to do).
Those "offending" zip files obviously have the extra data with ZIP64 tag (0x0001),
but the entry size/csize are "normal"/non-zip64-value.
The change is to back to the correct implementation, only check and
set the ZIP64 size(s) if the sizes in the zip entry size fields are "zip64 magic
I'm not adding a regression test, as it will force to check in another "binary"
zip file into the repository (the ZipOutputStream does not output a "bogus" extra
data with ZIP64 tag, if the sizes do not requires a ZIP64 extra data). I've manually
verify the fix against the test case attached in the bug report.
More information about the core-libs-dev