You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "Christopher Tubbs (JIRA)" <ji...@apache.org> on 2014/06/07 19:27:01 UTC

[jira] [Commented] (ACCUMULO-2870) Potential null pointer dereference in Tablet#longestCommonLength()

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

Christopher Tubbs commented on ACCUMULO-2870:
---------------------------------------------

This issue needs an affectedVersion.

> Potential null pointer dereference in Tablet#longestCommonLength()
> ------------------------------------------------------------------
>
>                 Key: ACCUMULO-2870
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-2870
>             Project: Accumulo
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Priority: Minor
>
> longestCommonLength() is called by findSplitRow():
> {code}
>       Text text = (mid == null) ? null : mid.getRow();
>       SortedMap<Double,Key> firstHalf = keys.headMap(.5);
>       if (firstHalf.size() > 0) {
>         Text beforeMid = firstHalf.get(firstHalf.lastKey()).getRow();
>         Text shorter = new Text();
>         int trunc = longestCommonLength(text, beforeMid);
> {code}
> If mid is null, text would be null.
> However, text is dereferenced without null check in longestCommonLength().



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