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

CharTermAttributeImpl.setLength missing bounds check

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

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

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment