RFR: 8354799: ZipInputStream doesn't verify CRC for empty ZipEntry

Eirik Bjørsnøs eirbjo at openjdk.org
Thu May 8 13:34:53 UTC 2025


On Thu, 8 May 2025 12:08:09 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

> Can I please get a review of this change which addresses the issue noted in https://bugs.openjdk.org/browse/JDK-8354799?
> 
> `java.util.zip.ZipInputStream` when dealing with a `STORED` entry of zero size was missing a CRC check for that entry. The change in this PR addresses that and introduces a new jtreg test which reproduces the issue and verifies the fix.
> 
> tier testing is currently in progress.

I found «empty ZipEntry» in the title here somewhat confusing since that’s an API class and can’t be «empty» as such.

We think «ZIP entry with empty file data» would be more correct.

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

PR Comment: https://git.openjdk.org/jdk/pull/25116#issuecomment-2863085922


More information about the core-libs-dev mailing list