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

Use ConstDataCursor to read buffer in Checksum::gen

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.1.7
    • Fix Version/s: 3.3.1
    • Component/s: Portability
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: