Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-20266

Use ConstDataCursor to read buffer in Checksum::gen

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.3.1
    • Affects Version/s: 3.1.7
    • Component/s: Portability
    • None
    • Fully Compatible
    • ALL
    • Platforms F (01/29/16)

      Checksum::gen computes a checksum for a given buffer by casting the content of the buffer into 64-bit numbers, 8 bytes at a time. The casts and subsequent operations yield incorrect results on a big-endian system. A simple fix would be to wrap the buffer in a ConstDataCursor and read the 64-bit numbers in little-endian order.

            Assignee:
            tess.avitabile@mongodb.com Tess Avitabile (Inactive)
            Reporter:
            bryanpkc Bryan Chan
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: