On Wed, 3 Jan 2024 18:01:59 GMT, Brian Burkhalter <b...@openjdk.org> wrote:
> The final position instead of the number of bytes to write was being passed > to `ByteArrayOuputStream.write(byte[],int,int)`. src/java.base/share/classes/java/io/BufferedInputStream.java line 650: > 648: } else { > 649: // Prevent poisoning and leaking of buf > 650: byte[] buffer = Arrays.copyOfRange(getBufIfOpen(), > pos, count); @bplb Shouldn't it be `avail` *here*, too? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/17250#discussion_r1442120135