mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8278428: ObjectInputStream.readFully range check incorrect
Reviewed-by: alanb
This commit is contained in:
parent
5a80abf706
commit
8e8fadf2d4
2 changed files with 45 additions and 24 deletions
|
@ -1204,7 +1204,7 @@ public class ObjectInputStream
|
|||
* @throws IOException If other I/O error has occurred.
|
||||
*/
|
||||
public void readFully(byte[] buf, int off, int len) throws IOException {
|
||||
Objects.checkFromToIndex(off, len, buf.length);
|
||||
Objects.checkFromIndexSize(off, len, buf.length);
|
||||
bin.readFully(buf, off, len, false);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue