Coverity analysis defect 99580: Unsafe assignment operator

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 3.3.10
    • Affects Version/s: None
    • Component/s: Networking
    • None
    • Fully Compatible
    • ALL
    • Platforms 17 (07/15/16)
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Assignment operator does not check for self-assignment

      Defect 99580 (STATIC_C)
      Checker SELF_ASSIGN (subcategory none)
      File: /src/mongo/transport/session.cpp
      Function mongo::transport::Session::operator =(mongo::transport::Session&&)
      /src/mongo/transport/session.cpp, line: 65
      No protection against the object assigning to itself.

              _id = other._id;
      

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

              Created:
              Updated:
              Resolved: