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

LongBitSet.ensureCapacity overflows on numBits > Integer.MaxValue

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.2, 6.0
    • Component/s: core/other
    • Labels:
      None
    • Lucene Fields:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: