Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-4088

DDMReader readBytes ArrayIndexOutOfBoundsException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.4.2.0
    • 10.4.2.1, 10.5.1.1
    • Network Server
    • None
    • CentOS 5, java 1.6.0_11
    • High Value Fix

    Description

      DDMReader.readBytes(int length) checks the length vs DssConstants.MAX_DSS_LENGTH, but ignores the fact that the buffer position "pos" might not be 0. If pos is non-zero then the pos + length can be larger than the size of "buffer" causing an ArrayIndexOutOfBoundsException.

      For me this happened when sending a BLOB that was 32766 bytes long. The value of pos was 2 in that method.

      Attachments

        1. derby-4088.diff
          5 kB
          Knut Anders Hatlen
        2. derby-4088-2.diff
          4 kB
          Knut Anders Hatlen
        3. DerbyBug.java
          0.6 kB
          Urban Widmark
        4. derby-ddm.patch
          0.5 kB
          Urban Widmark

        Activity

          People

            knutanders Knut Anders Hatlen
            urban Urban Widmark
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: