[SERVER-71700] Coverity analysis defect 134250: Unsafe assignment operator Created: 30/Nov/22  Updated: 07/Dec/22  Resolved: 07/Dec/22

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

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Kshitij Gupta
Resolution: Duplicate Votes: 0
Labels: coverity, new-eng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-71818 Use the new cluster role class in the... Closed
Operating System: ALL
Sprint: Sharding 2022-12-12
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/db/server_options.h:57: SELF_ASSIGN 134250 No protection against the object assigning to itself.



 Comments   
Comment by Kshitij Gupta [ 07/Dec/22 ]

This was fixed as part of SERVER-71818

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