jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harish Reddy (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (JCR-3799) Setting large binary value on jcr_data property fails
Date Thu, 24 Jul 2014 21:44:40 GMT

     [ https://issues.apache.org/jira/browse/JCR-3799?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Harish Reddy updated JCR-3799:
------------------------------

    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. 

  was:
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. 


> Setting large binary value on jcr_data property fails
> -----------------------------------------------------
>
>                 Key: JCR-3799
>                 URL: https://issues.apache.org/jira/browse/JCR-3799
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-jcr-rmi
>    Affects Versions: 2.6.5
>         Environment: Any
>            Reporter: Harish Reddy
>
> 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. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message