Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-7946

CharTermAttributeImpl.setLength missing bounds check

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 7.1, 8.0
    • modules/analysis
    • None
    • New

    Description

      CharTermAttribute.setLength partially checks for out of bounds values (exceeds term buffer array size) but doesn't check for negative values.

      This can be confusing as then the negative length will only fail or misbehave much later, for example with the first iteration of LUCENE-7940. It fails later only when we call toString() afterwards.

      Attachments

        1. LUCENE-7946.patch
          2 kB
          Robert Muir

        Activity

          People

            Unassigned Unassigned
            rcmuir Robert Muir
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: