[SERVER-68815] Coverity analysis defect 122631: Dereference after null check Created: 14/Aug/22  Updated: 29/Oct/23  Resolved: 18/Nov/22

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

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Will Buerger
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 2022-11-28
Participants:

 Description   

Dereference after null check

Either the check against null is unnecessary, or there may be a null pointer dereference. Pointer is checked against null but then dereferenced anyway
/src/mongo/db/storage/index_entry_comparison.cpp:277: FORWARD_NULL 122631 Comparing "desc" to null implies that "desc" might be null.



 Comments   
Comment by Githook User [ 17/Nov/22 ]

Author:

{'name': 'Will Buerger', 'email': 'will.buerger@mongodb.com', 'username': 'wbuerger46'}

Message: SERVER-68815: Fix coverity dereference after null check
Branch: master
https://github.com/mongodb/mongo/commit/a6aa9344d3c996f4239f502e4d5676d9fdb35fa9

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