Hello Archie,

Archie Cobbs wrote on 09.05.2024 20:09 (GMT +02:00):

FWIW when I run the test case in that bug on the latest JDK 23 (jdk-23+21-110-g0a4eeeaa3c6), it does not report any exception.
So this bug may have gotten fixed by recent changes and just needs to be closed... ?
Interesting observation, I can confirm this with 23+EA-22.
 
However, for my corrupt sample ZIPs, it still fails:
So maybe there are two different causes.
 
I made some progress in regards to identifying the source,
the file in question is probably generated with POI.
 
I hope I can share a publishable file soon - keep you posted.
 
C:\temp>Downloads\openjdk-23-ea+22_windows-x64_bin\jdk-23\bin\java LocalTest.java
Entry name: [Content_Types].xml
Entry compressed size: -1
Entry uncompressed size: -1
Stream failed at byte 1052
Post readEnd() compressed size: 315
Post readEnd() uncompressed size: 0
java.util.zip.ZipException: invalid entry size (expected 0 but got 1052 bytes)
        at java.base/java.util.zip.ZipInputStream.readEnd(ZipInputStream.java:634)
        at java.base/java.util.zip.ZipInputStream.read(ZipInputStream.java:415)
        at java.base/java.util.zip.InflaterInputStream.read(InflaterInputStream.java:125)
        at java.base/java.util.zip.ZipInputStream.read(ZipInputStream.java:211)
        at LocalTest.main(LocalTest.java:46) ...

Reply via email to