Coverity analysis defect 98553: Unsafe assignment operator

XMLWordPrintableJSON

    • Fully Compatible
    • ALL
    • Platforms 14 (05/13/16)
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Assignment operator does not check for self-assignment

      Defect 98553 (STATIC_C)
      Checker SELF_ASSIGN (subcategory none)
      File: /src/mongo/base/secure_allocator.h
      Function mongo::SecureHandle<std::basic_string<char, std::char_traits<char>, mongo::SecureAllocator<char>>>::operator =(const mongo::SecureHandle<std::basic_string<char, std::char_traits<char>, mongo::SecureAllocator<char>>>&)
      /src/mongo/base/secure_allocator.h, line: 229
      No protection against the object assigning to itself.

                      _t = _new(*other);
      

            Assignee:
            Mira Carey
            Reporter:
            Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: