[SERVER-24357] Coverity analysis defect 99580: Unsafe assignment operator Created: 02/Jun/16  Updated: 19/Jul/16  Resolved: 11/Jul/16

Status: Closed
Project: Core Server
Component/s: Networking
Affects Version/s: None
Fix Version/s: 3.3.10

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Waley Chen
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Platforms 17 (07/15/16)
Participants:

 Description   

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;



 Comments   
Comment by Githook User [ 11/Jul/16 ]

Author:

{u'username': u'WaleyChen', u'name': u'Waley Chen', u'email': u'waleycz@gmail.com'}

Message: SERVER-24357 Coverity analysis defect 99580: Unsafe assignment operator
Branch: master
https://github.com/mongodb/mongo/commit/22e0e107a84233e04f5986d1e62272bbf96cb793

Generated at Thu Feb 08 04:06:08 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.