[SERVER-68883] Coverity analysis defect 127652: Uninitialized pointer field Created: 17/Aug/22  Updated: 27/Oct/23  Resolved: 26/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: Yuhong Zhang
Resolution: Works as Designed Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Sprint: Execution Team 2022-09-05
Participants:

 Description   

Uninitialized pointer field

The pointer field will point to an arbitrary memory location, any attempt to write may cause corruption. A pointer field is not initialized in the constructor
/src/mongo/bson/bson_validate.cpp:406: UNINIT_CTOR 127652 Class member declaration for "_currFrame".
/src/mongo/bson/bson_validate.cpp:188: UNINIT_CTOR 127652 Non-static class member "_currFrame" is not initialized in this constructor nor in any functions that it calls.
/opt/mongodbtoolchain/revisions/ebe7e16df6d5d79c26469c0020effe50b548fdb6/stow/gcc-v4.1CC/include/c++/11.2.0/array:111: UNINIT_CTOR 127652 Class member declaration for "_M_elems".
/src/mongo/bson/bson_validate.cpp:188: UNINIT_CTOR 127652 Non-static class member "_frames._M_elems" is not initialized in this constructor nor in any functions that it calls.


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