accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Elser (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (ACCUMULO-2870) Potential null pointer dereference in Tablet#longestCommonLength()
Date Thu, 26 Jun 2014 18:13:25 GMT

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

Josh Elser updated ACCUMULO-2870:
---------------------------------

    Attachment: 0001-ACCUMULO-2870-Fail-hard-and-fast-if-we-don-t-calcula.patch

Can someone take a quick look at this before I commit it, please?

> Potential null pointer dereference in Tablet#longestCommonLength()
> ------------------------------------------------------------------
>
>                 Key: ACCUMULO-2870
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-2870
>             Project: Accumulo
>          Issue Type: Bug
>    Affects Versions: 1.5.1, 1.6.0
>            Reporter: Ted Yu
>            Priority: Minor
>             Fix For: 1.5.2, 1.6.1, 1.7.0
>
>         Attachments: 0001-ACCUMULO-2870-Fail-hard-and-fast-if-we-don-t-calcula.patch
>
>
> 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)

Mime
View raw message