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

Coverity analysis defect 100076: Unsafe assignment operator

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.5.1
    • Component/s: Querying
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      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

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: