summaryrefslogtreecommitdiffstats
path: root/ldap/servers/plugins/replication/windows_connection.c
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2010-07-07 15:20:22 -0500
committerNoriko Hosoi <nhosoi@redhat.com>2010-08-23 17:07:59 -0700
commita85e68002e75cc4f1208b9c6d55219667a21d798 (patch)
treec315c78bbcfccbc1c3bfe28000ac0f9f1ba3c196 /ldap/servers/plugins/replication/windows_connection.c
parent8dd19cc7e6d8d20a83a5fcc7f9db85aa89c996c3 (diff)
downloadds-a85e68002e75cc4f1208b9c6d55219667a21d798.tar.gz
ds-a85e68002e75cc4f1208b9c6d55219667a21d798.tar.xz
ds-a85e68002e75cc4f1208b9c6d55219667a21d798.zip
Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues 11940 - 12166
https://bugzilla.redhat.com/show_bug.cgi?id=611790 Resolves: bug 611790 Bug description: Fix coverify Defect Type: Null pointer dereferences issues 11940 - 12166 Fix description: Catch possible NULL pointer in windows_search_entry_ext().
Diffstat (limited to 'ldap/servers/plugins/replication/windows_connection.c')
-rw-r--r--ldap/servers/plugins/replication/windows_connection.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ldap/servers/plugins/replication/windows_connection.c b/ldap/servers/plugins/replication/windows_connection.c
index 5eab68d5..f337b944 100644
--- a/ldap/servers/plugins/replication/windows_connection.c
+++ b/ldap/servers/plugins/replication/windows_connection.c
@@ -626,6 +626,12 @@ windows_search_entry_ext(Repl_Connection *conn, char* searchbase, char *filter,
LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_search_entry\n", 0, 0, 0 );
+ if (!entry) {
+ LDAPDebug( LDAP_DEBUG_ANY, "windows_search_entry: NULL entry\n", 0, 0, 0 );
+ return_value = CONN_LOCAL_ERROR; /* entry should never == NULL here */
+ goto done;
+ }
+
*entry = NULL;
if (windows_conn_connected(conn))
@@ -702,6 +708,7 @@ windows_search_entry_ext(Repl_Connection *conn, char* searchbase, char *filter,
{
return_value = CONN_NOT_CONNECTED;
}
+done:
LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_search_entry\n", 0, 0, 0 );
return return_value;
}