[SERVER-37485] Coverity analysis defect 105062: Uninitialized pointer field Created: 05/Oct/18  Updated: 29/Oct/23  Resolved: 19/Oct/18

Status: Closed
Project: Core Server
Component/s: Security
Affects Version/s: None
Fix Version/s: 4.1.5

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Jonathan Reams
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: Security 2018-10-08, Security 2018-10-22
Participants:

 Description   

A pointer field is not initialized in the constructor

Defect 105062 (STATIC_C)
Checker UNINIT_CTOR (subcategory pointer)
File: /src/mongo/db/auth/authorization_manager_impl.cpp
Function mongo::<unnamed>::PinnedUserSetParameter::PinnedUserSetParameter()
/src/mongo/db/auth/authorization_manager_impl.cpp, line: 217
Class member declaration for "_authzManager".

        AuthorizationManager* _authzManager;

/src/mongo/db/auth/authorization_manager_impl.cpp, line: 121
Non-static class member "_authzManager" is not initialized in this constructor nor in any functions that it calls.

                  ServerParameterSet::getGlobal(), "authorizationManagerPinnedUsers", true, true) {}



 Comments   
Comment by Githook User [ 19/Oct/18 ]

Author:

{'name': 'Jonathan Reams', 'email': 'jbreams@mongodb.com', 'username': 'jbreams'}

Message: SERVER-37485 Ensure pointer is default-intialized to nullptr
Branch: master
https://github.com/mongodb/mongo/commit/c533240e6ae84191863ae66293a8a37d2089dfc6

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