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

FST Sorter BufferSize causes int overflow if BufferSize > 2048MB

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.6, 4.0-ALPHA
    • 4.0-ALPHA, 3.6.1
    • modules/spellchecker
    • None
    • New, Patch Available

    Description

      the BufferSize constructor accepts size in MB as an integer and uses multiplication to convert to bytes. While its checking the size in bytes to be less than 2048 MB it does that after byte conversion. If you pass a value > 2047 to the ctor the value overflows since all constants and methods based on MB expect 32 bit signed ints. This does not even result in an exception until the BufferSize is actually passed to the sorter.

      Attachments

        1. LUCENE-4074.patch
          4 kB
          Simon Willnauer

        Activity

          People

            simonw Simon Willnauer
            simonw Simon Willnauer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: