On Sun, 20 Mar 2022 04:24:07 GMT, Jaikiran Pai <j...@openjdk.org> wrote:

> Can I please get a review of this change which handles 
> https://bugs.openjdk.java.net/browse/JDK-8283411?
> 
> The commit here moves the temporary byte array from being a member of the 
> class to a local variable within the `skip` method which is the only place 
> where it is used as a temporary buffer.
> 
> tier1, tier2, tier3 tests have been run successfully with this change.

src/java.base/share/classes/java/util/zip/InflaterInputStream.java line 206:

> 204:         int max = (int)Math.min(n, Integer.MAX_VALUE);
> 205:         int total = 0;
> 206:         byte[] b = new byte[512];

n may be less than 512 so maybe the temporary array can be of length 
Math.min(max, 512).

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

PR: https://git.openjdk.java.net/jdk/pull/7875

Reply via email to