On Mon, 14 Aug 2023 18:32:15 GMT, Lance Andersen <lan...@openjdk.org> wrote:

>I am not understanding your point. There is a specific order for the Zip64 
>fields based on which fields have the Magic value. the spec does also not 
>suggest that an empty Zip64 extra field can be written to the CEN when there 
>is a Zip64 with data written to the LOC.

Yes, there is a specific order of fields that should be stored in the extended 
block if some of the data in the "body" is negative. But as you pointed out in 
this case the empty block or block bigger than necessary to store the 
size/csize/locoff is not prohibited by the spec. For example, take a look at 
the code in the 
[ZipEntry](https://github.com/openjdk/jdk/blob/c132176b932dd136d5c4314e08ac97d0fee7ba4d/src/java.base/share/classes/java/util/zip/ZipEntry.java#L553)
 where we accept any size of that block and just checked that it has required 
data in it.

If you disagree then point to the part of the spec which blocks such sizes.

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

PR Comment: https://git.openjdk.org/jdk/pull/15273#issuecomment-1677878124

Reply via email to