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

Coverity analysis defect 121491: Dereference after null check

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 6.0.0-rc0
    • None
    • None
    • Fully Compatible
    • ALL
    • Execution Team 2022-04-04

    Description

      Dereference after null check

      Either the check against null is unnecessary, or there may be a null pointer dereference. Pointer is checked against null but then dereferenced anyway
      /src/mongo/db/catalog/create_collection.cpp:769: FORWARD_NULL 121491 Comparing "db" to null implies that "db" might be null.
      /src/mongo/db/catalog/create_collection.cpp:776: FORWARD_NULL 121491 Passing null pointer "db" to "makeUniqueCollectionNamespace", which dereferences it. (The dereference happens because this is a virtual function call.)

      Attachments

        Activity

          People

            yujin.kang@mongodb.com Yujin Kang Park
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: