You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Alex Parvulescu (JIRA)" <ji...@apache.org> on 2014/09/03 13:55:51 UTC

[jira] [Commented] (OAK-2073) Prevent against integer overflow in compaction check

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

Alex Parvulescu commented on OAK-2073:
--------------------------------------

My proposal is to turn the count itself into a long and also shortcut the check by verifying if the property size is bigger than the threshold.
{code}
  long size = ps.size(i);
  count += size;
  if (size >= threshold || count >= threshold) {
{code}
this should cover even the sensitive 'external binary' case.

> Prevent against integer overflow in compaction check
> ----------------------------------------------------
>
>                 Key: OAK-2073
>                 URL: https://issues.apache.org/jira/browse/OAK-2073
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core, segmentmk
>    Affects Versions: 1.0.5
>            Reporter: Alex Parvulescu
>            Assignee: Alex Parvulescu
>            Priority: Minor
>             Fix For: 1.1, 1.0.6
>
>
> Currently there is a check in the Compactor which decides if a node is included in the compaction map based on its size. This is prone to the large size issue seen earlier with external binaries reporting a huge size, and might cause an integer overflow.



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