https://bz.apache.org/bugzilla/show_bug.cgi?id=66873
Bug ID: 66873
Summary: org.apache.tools.zip.ZipOutputStream doesn't always
populate CEN extra field when zip64Mode=always
Product: Ant
Version: 1.10.13
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P2
Component: Core tasks
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
org.apache.tools.zip.ZipOutputStream allows a user configurable Zip64Mode which
defaults to Zip64Mode.AsNeeded.
When this Zip64Mode is configured to "always" and a entry whose size is lesser
than 0xFFFFFFFFL is being added to the zip, then ZipOutputStream ends up
creating a CEN with a extra field whose header size is set as 0 and the
compressed and uncompressed size of such entries aren't written out to the CEN
extra field. The compressed and uncompressed size of that entry continue to get
written in the regular "Compressed size" and "Uncompressed size" fields of the
CEN.
At the same time, for the same entry, ZipOutputStream ends up creating a LOC
whose "Compressed size" and "Uncompressed size" is marked as 0xffffffff (as
expected by the spec) and the actual sizes are recorded (correctly) in the
LOC's extra field.
This effectively means that even with the use of "always" for Zip64Mode,
ZipOutputStream may not always set the CEN extra field values.
--
You are receiving this mail because:
You are the assignee for the bug.