[SERVER-70227] Coverity analysis defect 133948: Unsafe assignment operator Created: 05/Oct/22  Updated: 29/Oct/23  Resolved: 11/Oct/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.2.0-rc0

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Matt Diener (Inactive)
Resolution: Fixed Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2022-10-05 at 9.53.35 AM.png    
Issue Links:
Problem/Incident
is caused by SERVER-69830 Capture metrics for the SessionWorkfl... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Service Arch 2022-10-17
Participants:

 Description   

Unsafe assignment operator

This user-written assignment operator does not check for self-assignment. If an object of this type is assigned to itself use-after-free errors may occur if the class owns resources. Assignment operator does not check for self-assignment
/src/mongo/transport/session_workflow.cpp:200: SELF_ASSIGN 133948 No protection against the object assigning to itself.



 Comments   
Comment by Githook User [ 11/Oct/22 ]

Author:

{'name': 'Matt Diener', 'email': 'matt.diener@mongodb.com', 'username': 'mattdiener'}

Message: SERVER-70227 fix move assignment of SessionWorkflowMetrics
Branch: master
https://github.com/mongodb/mongo/commit/ec17f2159390bb0efec9639c0aa2848c7d3f6e52

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