Coverity analysis defect 121548: Pointer to local outside scope

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Gone away
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • ALL
    • QO 2022-03-07
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Pointer to local outside scope

      Dereferencing the returned or out-of-scope stack pointer will access an invalid location on the stack after its scope or after the function returns. Pointer to a local stack variable returned or used outside scope
      /src/mongo/db/query/planner_analysis.cpp:634: RETURN_LOCAL 121548 Assigning: "prefixedIndex" = "&idxEntry" (address of local variable "idxEntry").
      /src/mongo/db/query/planner_analysis.cpp:635: RETURN_LOCAL 121548 Variable "idxEntry" goes out of scope.
      /src/mongo/db/query/planner_analysis.cpp:643: RETURN_LOCAL 121548 Using "prefixedIndex", which points to an out-of-scope variable "idxEntry".

            Assignee:
            Nikita Lapkov (Inactive)
            Reporter:
            Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: