[SERVER-23507] Coverity analysis defect 98215: Dereference null return value Created: 04/Apr/16  Updated: 26/Apr/16  Resolved: 05/Apr/16

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

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Kaloian Manassiev
Resolution: Done Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 13 (04/22/16)
Participants:

 Description   

Return value of function which returns null is dereferenced without checking

Defect 98215 (STATIC_C)
Checker NULL_RETURNS (subcategory none)
File: /src/mongo/db/dbwebserver.cpp
Function mongo::<unnamed>::CommandsHandler::_cmd(const std::basic_string<char, std::char_traits<char>, std::allocator<char>>&) const
/src/mongo/db/dbwebserver.cpp, line: 292
Assigning: "cmd" = null return value from "findCommand".

            Command* cmd = Command::findCommand(cmdName);



 Comments   
Comment by Githook User [ 05/Apr/16 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-23507 Do not dereference null value in dbwebserver.cpp
Branch: master
https://github.com/mongodb/mongo/commit/9b3f5992a38b05d0e11215a25fd63bd3fdf890ab

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