[SERVER-23531] Coverity analysis defect 98181: Logically dead code Created: 05/Apr/16  Updated: 06/Jun/16  Resolved: 16/May/16

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

Type: Bug Priority: Minor - P4
Reporter: Coverity Collector User Assignee: Andreas Nilsson
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 12 (04/01/16), Security 13 (04/22/16), Security 14 (05/13/16), Security 15 (06/03/16)
Participants:

 Description   

Code can never be reached because of a logical contradiction

Defect 98181 (STATIC_C)
Checker DEADCODE (subcategory none)
File: /src/mongo/db/modules/enterprise/src/ldap/connections/openldap_connection.cpp
Function mongo::OpenLDAPConnection::connect()
/src/mongo/db/modules/enterprise/src/ldap/connections/openldap_connection.cpp, line: 219
The result of pointer arithmetic "++it" is never null.

                    if (++it == nullptr) {

/src/mongo/db/modules/enterprise/src/ldap/connections/openldap_connection.cpp, line: 219
At condition "+it == NULL", the value of "+it" cannot be "NULL".

                    if (++it == nullptr) {

/src/mongo/db/modules/enterprise/src/ldap/connections/openldap_connection.cpp, line: 219
The condition "++it == NULL" cannot be true.

                    if (++it == nullptr) {

/src/mongo/db/modules/enterprise/src/ldap/connections/openldap_connection.cpp, line: 220
Execution cannot reach this statement: "log << "], ";".

                        log << "], ";



 Comments   
Comment by Githook User [ 16/May/16 ]

Author:

{u'name': u'Andreas Nilsson', u'email': u'andreas.nilsson@mongodb.com'}

Message: SERVER-23531 Fix OpenLDAP error message condition
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/db8a53d9107857d2646975d6cb1942a069bfea04

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