Coverity analysis defect 183913: Dereference null return value

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Catalog and Routing
    • ALL
    • CAR Team 2026-02-02
    • 1
    • 🟦 Shard Catalog
    • None
    • None
    • None
    • None
    • None
    • None

      Dereference null return value

      If the function actually returns a null value, a null pointer dereference will occur. Return value of function which returns null is dereferenced without checking
      /src/mongo/db/shard_role/shard_catalog/coll_mod_index.cpp:365: NULL_RETURNS 183913 Assigning: "entry" = "nullptr" return value from "findIndexByName".
      /src/mongo/db/shard_role/shard_catalog/coll_mod_index.cpp:366: NULL_RETURNS 183913 Passing null pointer "entry" to "accessMethod", which dereferences it. (The dereference happens because this is a virtual function call.)

            Assignee:
            Enrico Golfieri
            Reporter:
            Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: