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

Coverity analysis defect 112182: Unsafe assignment operator

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Internal Code
    • ALL
    • Dev Tools 2019-04-08

      Assignment operator does not check for self-assignment

      Defect 112182 (STATIC_C)
      Checker SELF_ASSIGN (subcategory none)
      File: /src/mongo/base/data_builder.h
      Function mongo::DataBuilder::BufDeleter::operator =(mongo::DataBuilder::BufDeleter&&)
      /src/mongo/base/data_builder.h, line: 66
      No protection against the object assigning to itself.

                      _capacity = other._capacity;
      

            Assignee:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: