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

UnescapedCharSequence.toLowerCase throws ArrayIndexOutOfBoundsException for certain input strings

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Patch Available
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 5.0
    • Fix Version/s: None
    • Component/s: modules/queryparser
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      The static toLowerCase-method of UnescapedCharSequence does not account for locales in which the length of the result of String.toLowerCase is not the same as the length of the input string. This causes an ArrayIndexOutOfBoundsException, because wasEscaped and the chars array are not of the same length.
      (See attached test and patch)

        Attachments

        1. LUCENE-6358-fix.patch
          2 kB
          Christoph Kaser
        2. LUCENE-6358-test.patch
          2 kB
          Christoph Kaser

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              christophk Christoph Kaser
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: