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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 15
    • Fix Version/s: 16
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b11
    • CPU:
      generic
    • OS:
      generic

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bpb Brian Burkhalter
              Reporter:
              bpb Brian Burkhalter
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: