[SERVER-22907] Coverity analysis defect 86186: Unchecked return value Created: 01/Mar/16  Updated: 16/Mar/16  Resolved: 08/Mar/16

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

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

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Security 11 (03/11/16)
Participants:

 Description   

Value returned from a function is not checked for errors before being used

Defect 86186 (STATIC_C)
Checker CHECKED_RETURN (subcategory none)
File: /src/mongo/db/modules/enterprise/src/ldap/ldap_query.cpp
Function mongo::LDAPQuery::instantiateQuery(const mongo::UserNameSubstitutionLDAPQueryConfig &, mongo::StringData)
/src/mongo/db/modules/enterprise/src/ldap/ldap_query.cpp, line: 46
Calling "GlobalReplace" without checking return value (as is done elsewhere 3 out of 5 times).

        kUserNameMatchToken.GlobalReplace(userName.toString(), &instance._baseDN);

File: /src/mongo/db/modules/enterprise/src/ldap/ldap_query.cpp
Function mongo::LDAPQuery::instantiateQuery(const mongo::UserNameSubstitutionLDAPQueryConfig &, mongo::StringData)
/src/mongo/db/modules/enterprise/src/ldap/ldap_query.cpp, line: 47
Calling "GlobalReplace" without checking return value (as is done elsewhere 3 out of 5 times).

        kUserNameMatchToken.GlobalReplace(userName.toString(), &instance._filter);



 Comments   
Comment by Githook User [ 08/Mar/16 ]

Author:

{u'username': u'spencerjackson', u'name': u'Spencer Jackson', u'email': u'spencer.jackson@mongodb.com'}

Message: SERVER-22907: Check regex return for errors
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/ababf91417207821feef154b2f6668c6d70c476a

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