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

Coverity analysis defect 100076: Unsafe assignment operator

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.5.1
    • Querying
    • Fully Compatible
    • ALL
    • Query 2016-12-12

    Description

      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;

      Attachments

        Activity

          People

            david.storch@mongodb.com David Storch
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: