Coverity analysis defect 100076: Unsafe assignment operator

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 3.5.1
    • Affects Version/s: None
    • Component/s: Querying
    • Fully Compatible
    • ALL
    • Query 2016-12-12
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Assignment operator does not check for self-assignment

      Defect 100076 (STATIC_C)
      Checker SELF_ASSIGN (subcategory none)
      File: /src/mongo/db/clientcursor.cpp
      Function mongo::ClientCursorPin::operator =(mongo::ClientCursorPin&&)
      /src/mongo/db/clientcursor.cpp, line: 198
      No protection against the object assigning to itself.

              _cursor = other._cursor;
      

            Assignee:
            David Storch
            Reporter:
            Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: