DiskLoc56Bit::Z accesses bytes not owned by current DiskLoc56Bit object

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.5.2
    • Affects Version/s: None
    • Component/s: None
    • None
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In https://github.com/mongodb/mongo/blob/57213bdd0d1abf214f4a7db3f6e4aa161a69a9c5/src/mongo/db/btree.h#L194

      DiskLoc56Bit::Z does an 8 byte read from a reinterpret_cast'ed this pointer. However, a DiskLoc56Bit is only 7 bytes long, so this is undefined behavior.

      The 'Z' method should be rewritten to only access the bytes owned by the current DiskLoc56Bit.

              Assignee:
              Unassigned
              Reporter:
              Andrew Morrow (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: