Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8245036

DataInputStream.readFully(byte[], int, int) does not throw expected IndexOutOfBoundsExceptions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 16
    • 15
    • core-libs
    • None
    • b11
    • generic
    • generic

      readFully(b,off,len) should throw IIOBE if off is negative, len is negative, or len is greater than b.length - off. In particular it does not if if off is negative and len is 0. This issue was raised in https://mail.openjdk.java.net/pipermail/core-libs-dev/2020-May/066453.html.

            bpb Brian Burkhalter
            bpb Brian Burkhalter
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: