[SERVER-68729] Coverity analysis defect 128586: Dereference null return value Created: 11/Aug/22  Updated: 22/Aug/22  Resolved: 22/Aug/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: Dan Larkin-York
Resolution: Duplicate Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-69052 Ensure bucket collection is valid whe... Closed
Operating System: ALL
Sprint: Execution Team 2022-09-05
Participants:

 Description   

Dereference null return value

If the function actually returns a null value, a null pointer dereference will occur. Return value of function which returns null is dereferenced without checking
/src/mongo/db/commands/write_commands.cpp:1357: NULL_RETURNS 128586 Assigning: "bucketsColl" = "nullptr" return value from "lookupCollectionByNamespaceForRead".
/src/mongo/db/commands/write_commands.cpp:1360: NULL_RETURNS 128586 Attempting to access the managed object of an empty smart pointer "bucketsColl".


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