Fix 32 bit integer overflows in ByteBufferStream and MultiChunkBuffer

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.1
    • Affects Version/s: 2.0
    • Component/s: BSON
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The current implementations of ByteBufferStream and MultiChunkBuffer use 32 bit integers for certain fields, which limits them to a maximum size of 2GB (minus 1).

      At this point we're not going to change the 2GB limit, but there are certain cases where the current implementation uses 32 bit arithmetic which can result in integer overflow and large values being mis-interpreted as negative numbers, causing odd results.

            Assignee:
            Robert Stam
            Reporter:
            Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: