mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8322877: java/io/BufferedInputStream/TransferTo.java failed with IndexOutOfBoundsException
Reviewed-by: alanb, stsypanov
This commit is contained in:
parent
30a0c61de0
commit
54b3ceeca2
2 changed files with 2 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1994, 2023, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1994, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -644,7 +644,7 @@ public class BufferedInputStream extends FilterInputStream {
|
||||||
int avail = count - pos;
|
int avail = count - pos;
|
||||||
if (avail > 0) {
|
if (avail > 0) {
|
||||||
if (isTrusted(out)) {
|
if (isTrusted(out)) {
|
||||||
out.write(getBufIfOpen(), pos, count);
|
out.write(getBufIfOpen(), pos, avail);
|
||||||
} else {
|
} else {
|
||||||
// Prevent poisoning and leaking of buf
|
// Prevent poisoning and leaking of buf
|
||||||
byte[] buffer = Arrays.copyOfRange(getBufIfOpen(), pos, count);
|
byte[] buffer = Arrays.copyOfRange(getBufIfOpen(), pos, count);
|
||||||
|
|
|
@ -503,7 +503,6 @@ java/lang/instrument/RetransformBigClass.sh 8065756 generic-
|
||||||
# jdk_io
|
# jdk_io
|
||||||
|
|
||||||
java/io/pathNames/GeneralWin32.java 8180264 windows-all
|
java/io/pathNames/GeneralWin32.java 8180264 windows-all
|
||||||
java/io/BufferedInputStream/TransferTo.java 8322877 generic-all
|
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue