[ 
https://issues.apache.org/jira/browse/OAK-3105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14628090#comment-14628090
 ] 

Francesco Mari commented on OAK-3105:
-------------------------------------

Thanks [~mduerig] for applying!

> 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.2.2, 1.3.2, 1.0.17
>            Reporter: Francesco Mari
>            Assignee: Michael Dürig
>            Priority: Critical
>             Fix For: 1.2.3, 1.3.3, 1.0.18
>
>         Attachments: OAK-3105-01.patch
>
>
> 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