[8u] RFR 8190753: (zipfs): Accessing a large entry (> 2^31 bytes) leads to a negative initial size for ByteArrayOutputStream
Hohensee, Paul
hohensee at amazon.com
Mon Nov 29 21:18:32 UTC 2021
Lgtm.
Thanks,
Paul
-----Original Message-----
From: jdk8u-dev <jdk8u-dev-retn at openjdk.java.net> on behalf of Alexey Pavlyutkin <apavlyutkin at azul.com>
Date: Thursday, November 25, 2021 at 4:24 AM
To: "jdk8u-dev at openjdk.java.net" <jdk8u-dev at openjdk.java.net>
Subject: [8u] RFR 8190753: (zipfs): Accessing a large entry (> 2^31 bytes) leads to a negative initial size for ByteArrayOutputStream
Bug: https://bugs.openjdk.java.net/browse/JDK-8190753
Patch: https://github.com/openjdk/jdk/commit/c3d8e9228d0558a2ce3e093c105c61ea7af2e1d1
I would like to backport this patch to openjdk8u (the issue was initially raised exactly against 8)
The following changes done to the original patch for 8u
1. eliminated using of unsupported instanceof pattern match feature
2. changes to absent DeflatingEntryOutputStream class were skipped (in 8 EntryOutputStream handles both RAW and deflating streaming)
3. tests were updated to not use unsupported APIs like Path.of(), Map.of(), etc.
8u webrev: http://cr.openjdk.java.net/~yan/8190753/webrev.00/
Verified with with accompanying
./jdk/test/demo/zipfs/LargeCompressedEntrySizeTest.java
./jdk/test/demo/zipfs/ZipFSOutputStreamTest.java
Regression: jdk:tier2
Thank you,
Alex
More information about the jdk8u-dev
mailing list