Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-3799

Setting large binary value on jcr:data property fails over RMI

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.6.5
    • None
    • jackrabbit-jcr-rmi
    • None
    • Any

    Description

      Setting a very large binary value on the jcr:data property fails and throws an an exception at line 187 in the 2.6.5 source (org.apache.jackrabbit.rmi.value.SerializableBinary.java)

      This appears to be a problem with converting a long variable into a
      int at line 187.

      n = stream.read(buffer, 0, Math.min(
      buffer.length, (int) (length - count)));

      The problem occurs only when the length of the binary exceeds a number that can't fit in an int (in my test case, length was 3245027213).

      Other parts of SerializableBinary.java also appear to be casting length to an int, so I'm guessing all instances of this pattern will need to be fixed.

      I'm using 2.6.5, so don't know if the issue exists in earlier 2.x versions as well. This used to work in v 1.5.4.

      Attachments

        Activity

          People

            Unassigned Unassigned
            spiderfeed Harish Reddy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: