Uploaded image for project: 'Accumulo'
  1. Accumulo
  2. ACCUMULO-2870

Potential null pointer dereference in Tablet#longestCommonLength()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.5.1, 1.6.0
    • 1.5.2, 1.6.1, 1.7.0
    • None
    • None

    Description

      longestCommonLength() is called by findSplitRow():

            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);
      

      If mid is null, text would be null.
      However, text is dereferenced without null check in longestCommonLength().

      Attachments

        Activity

          People

            elserj Josh Elser
            yuzhihong@gmail.com Ted Yu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 0.5h
                0.5h