[SERVER-67249] Coverity analysis defect 122354: Uninitialized scalar field Created: 13/Jun/22  Updated: 29/Oct/23  Resolved: 30/Jun/22

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

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Jennifer Peshansky (Inactive)
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: QO 2022-07-11
Participants:

 Description   

Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations. A scalar field is not initialized by the constructor
/src/mongo/util/pcre.cpp:311: UNINIT_CTOR 122354 Class member declaration for "_errorPos".
/src/mongo/util/pcre.cpp:166: UNINIT_CTOR 122354 Non-static class member "_errorPos" is not initialized in this constructor nor in any functions that it calls.



 Comments   
Comment by Githook User [ 30/Jun/22 ]

Author:

{'name': 'Jennifer Peshansky', 'email': 'jennifer.peshansky@mongodb.com', 'username': 'jenniferpeshansky'}

Message: SERVER-67249 Initialize _errorPos in RegexImpl constructor
Branch: master
https://github.com/mongodb/mongo/commit/644b521aa8ac7709af0fc576a5034d434fbbf972

Comment by Blake Oler [ 27/Jun/22 ]

Hey Jennifer – was this fixed in your most recent changes to that file? If not, feel free to either fix or throw back to our team to resolve.

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