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

StringData::compare can illegally pass nullptr to memcmp

    XMLWordPrintableJSON

Details

    • Fully Compatible
    • ALL
    • Platform B (10/30/15)

    Description

      It is undefined behavior to pass nullptr for either pointer argument to memcmp, however, StringData::compare does not guard against this. A default constructed StringData, for instance, has a nullptr _data member.

      Attachments

        Activity

          People

            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: