[jdk8u-dev] RFR: 8173072: zipfs fails to handle incorrect info-zip "extended timestamp extra field"

Xin Liu xliu at openjdk.org
Mon Jul 31 23:01:55 UTC 2023


Package nio.zipfs is in demo directory of jdk8u. It is not the part of standard libraries until jdk9. However, we found that some Java8 applications use it and hit a bug. I guess this manifests Hyrum's Law again. 

This patch can *NOT* apply to jdk8u cleanly. I need to adjust the directory. I drop the cosmetic changes in nio/zipfs/ZipCoder.java. It helps minimize changeset. If we want to include them, we need to backport other patches. 

We test jtreg locally. I reckon the risk is minimal because the patch only adds a few boundary checks in nio/zipfs/EXTT. Without it, zipfs throws java.lang.ArrayIndexOutOfBoundsException when it encounters a problematic zip file.

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

Commit messages:
 - Backport 248778d27a5f8a16e4c90a4f5a6632a7ca8e9a89

Changes: https://git.openjdk.org/jdk8u-dev/pull/349/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk8u-dev&pr=349&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8173072
  Stats: 4 lines in 1 file changed: 1 ins; 0 del; 3 mod
  Patch: https://git.openjdk.org/jdk8u-dev/pull/349.diff
  Fetch: git fetch https://git.openjdk.org/jdk8u-dev.git pull/349/head:pull/349

PR: https://git.openjdk.org/jdk8u-dev/pull/349


More information about the jdk8u-dev mailing list