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

Coverity analysis defect 100076: Unsafe assignment operator

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

      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@mongodb.com David Storch
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: