[jdk8u-dev] RFR: 8190753: (zipfs): Accessing a large entry (> 2^31 bytes) leads to a negative initial size for ByteArrayOutputStream

Alexey Pavlyutkin duke at openjdk.java.net
Fri Mar 18 12:31:05 UTC 2022


Hi!

Please review the backport of JDK-8190753 to 8u. The patch fixes IllegalArgumentException that takes place on accessing large (>2^31 bytes) entries in zipfs.

The original patch

https://github.com/openjdk/jdk11u-dev/pull/545

was applied with the following changes:

- changes to absent DeflatingEntryOutputStream class were skipped (in 8u EntryOutputStream handles both RAW and deflating streaming);
- the tests were updated to not use unsupported APIs like Path.of() and Map.of()
- timeout value for ZipFSOutputStreamTest was increased, because the test is too gready and may fail by timeout on low performance hosts

Verification/regression: jdk_other (20.04/amd64)

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

Commit messages:
 - 8190753: (zipfs): Accessing a large entry (> 2^31 bytes) leads to a negative initial size for ByteArrayOutputStream

Changes: https://git.openjdk.java.net/jdk8u-dev/pull/17/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk8u-dev&pr=17&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8190753
  Stats: 365 lines in 3 files changed: 360 ins; 1 del; 4 mod
  Patch: https://git.openjdk.java.net/jdk8u-dev/pull/17.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk8u-dev pull/17/head:pull/17

PR: https://git.openjdk.java.net/jdk8u-dev/pull/17


More information about the jdk8u-dev mailing list