Francesco Mari created OAK-3105:
-----------------------------------

             Summary: SegmentWriter doesn't properly check the length of 
external blob IDs
                 Key: OAK-3105
                 URL: https://issues.apache.org/jira/browse/OAK-3105
             Project: Jackrabbit Oak
          Issue Type: Bug
    Affects Versions: 1.0.17, 1.3.2, 1.2.2
            Reporter: Francesco Mari


To store the length field of an external binary ID, the following encoding is 
used:

{noformat}
1110 + 4bit + 8bit
{noformat}

which allows to store numbers between 0 and 2{^}12^ - 1. 

The current implementation of {{SegmentWriter}} allows the length of binary IDs 
to range between 0 and 2{^}13^ - 1, writing incorrect data when the length of 
the binary ID ranges from 2{^}12^ to 2{^}13^ - 1.

When reading this incorrect data back, an {{IllegalStateException}} is thrown 
complaining that the first byte of the length fields has an unexpected value 
record type. See OAK-1842 for an example.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to