[SERVER-57144] Coverity analysis defect 120117: Unsafe assignment operator Created: 23/May/21  Updated: 29/Oct/23  Resolved: 03/Jun/21

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

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

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2021-06-14
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/storage/bson_collection_catalog_entry.h:77: SELF_ASSIGN 120117 No protection against the object assigning to itself.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 03/Jun/21 ]

Author:

{'name': 'lukebhan', 'email': 'luke.bhan@vanderbilt.edu', 'username': 'lukebhan'}

Message: SERVER-57144 Add checking for self assignment in BSON object
Branch: master
https://github.com/mongodb/mongo/commit/aa6f00db15d3fe25a3c60e64bd32b6b5711205ba

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