[SERVER-53115] Coverity analysis defect 116702: Dereference before null check Created: 30/Nov/20  Updated: 29/Oct/23  Resolved: 04/Dec/20

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

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Billy Donahue
Resolution: Fixed Votes: 0
Labels: coverity, servicearch-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Service arch 2020-12-14
Participants:

 Description   

Dereference before null check

There may be a null pointer dereference, or else the comparison against null is unnecessary. All paths that lead to this null pointer comparison already dereference the pointer earlier
/src/mongo/db/curop.cpp:1088: REVERSE_INULL 116702 Null-checking "client" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.



 Comments   
Comment by Githook User [ 04/Dec/20 ]

Author:

{'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}

Message: SERVER-53115 check client before dereferencing
Branch: master
https://github.com/mongodb/mongo/commit/4d32e2bf75963c5ff5d4cdeb98554fb654c0d1de

Comment by Billy Donahue [ 03/Dec/20 ]

CR https://mongodbcr.appspot.com/747940021/

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