Return-Path: X-Original-To: apmail-accumulo-notifications-archive@minotaur.apache.org Delivered-To: apmail-accumulo-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C6F2210B29 for ; Wed, 23 Jul 2014 16:09:39 +0000 (UTC) Received: (qmail 53991 invoked by uid 500); 23 Jul 2014 16:09:39 -0000 Delivered-To: apmail-accumulo-notifications-archive@accumulo.apache.org Received: (qmail 53951 invoked by uid 500); 23 Jul 2014 16:09:39 -0000 Mailing-List: contact notifications-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jira@apache.org Delivered-To: mailing list notifications@accumulo.apache.org Received: (qmail 53936 invoked by uid 99); 23 Jul 2014 16:09:39 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Jul 2014 16:09:39 +0000 Date: Wed, 23 Jul 2014 16:09:39 +0000 (UTC) From: "Josh Elser (JIRA)" To: notifications@accumulo.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (ACCUMULO-2870) Potential null pointer dereference in Tablet#longestCommonLength() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/ACCUMULO-2870?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Josh Elser resolved ACCUMULO-2870. ---------------------------------- Resolution: Fixed > 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 > Assignee: Josh Elser > 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 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)