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

LongBitSet.ensureCapacity overflows on numBits > Integer.MaxValue

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 5.2, 6.0
    • core/other
    • None
    • New, Patch Available

    Description

      LongBitSet.ensureCapacity calculates the number of longs required to store the number of bits correctly and allocates a long[] accordingly, but then shifts the array length (which is an int!) left by 6 bits. The int should be cast to long before performing the shift.

      Attachments

        Activity

          People

            Unassigned Unassigned
            lvl Luc Vanlerberghe
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: