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

Coverity analysis defect 98553: Unsafe assignment operator

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Internal Code
    • Fully Compatible
    • ALL
    • Platforms 14 (05/13/16)

    Description

      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);

      Attachments

        Activity

          People

            mira.carey@mongodb.com Mira Carey
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: