Coverity analysis defect 112182: Unsafe assignment operator

XMLWordPrintableJSON

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

      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 (Inactive)
            Reporter:
            Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: