summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2010-07-06 11:24:38 -0500
committerNoriko Hosoi <nhosoi@redhat.com>2010-08-23 17:05:41 -0700
commitda27ed662d4e33c08b9012f931b077ed54056891 (patch)
treeb31585dd4b1d9c7d1942b92a9666afc09472963d
parenta3c4404cf6e1873a47d9e7c86b113bb6b91708b1 (diff)
downloadds-da27ed662d4e33c08b9012f931b077ed54056891.tar.gz
ds-da27ed662d4e33c08b9012f931b077ed54056891.tar.xz
ds-da27ed662d4e33c08b9012f931b077ed54056891.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 print_access_control_summary().
-rw-r--r--ldap/servers/plugins/acl/acl.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ldap/servers/plugins/acl/acl.c b/ldap/servers/plugins/acl/acl.c
index bdef64cc..cb20dbeb 100644
--- a/ldap/servers/plugins/acl/acl.c
+++ b/ldap/servers/plugins/acl/acl.c
@@ -702,6 +702,11 @@ static void print_access_control_summary( char *source, int ret_val, char *clien
return;
}
+ if ( !aclpb ) {
+ slapi_log_error ( SLAPI_LOG_FATAL, plugin_name, "Missing aclpb \n" );
+ return;
+ }
+
slapi_pblock_get(aclpb->aclpb_pblock, SLAPI_OPERATION, &op); /* for logging */
if (ret_val == LDAP_INSUFFICIENT_ACCESS) {
@@ -756,7 +761,7 @@ static void print_access_control_summary( char *source, int ret_val, char *clien
/* Is there a proxy */
- if ( aclpb != NULL && aclpb->aclpb_proxy != NULL) {
+ if ( aclpb->aclpb_proxy != NULL) {
if ( aclpb->aclpb_authorization_sdn != NULL ) {