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

RecordData should store size as unsigned

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      The RecordData class uses a signed int to store its size and implicitly converts it to size_t }}in a few places like calls to {{memcpy() and SharedBuffer::allocate().

      Since there is no sentinel value for having a negative size, size should be stored as unsigned.

       

      The outdated TODO in the file can be removed as well.

            Assignee:
            matt.kneiser@mongodb.com Matt Kneiser
            Reporter:
            matt.kneiser@mongodb.com Matt Kneiser
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: