summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2010-07-12 22:57:47 -0500
committerNoriko Hosoi <nhosoi@redhat.com>2010-08-19 13:03:19 -0700
commitca3ad2b93cfaf1dc427f81230e79fe9862fdd2f9 (patch)
tree12d8dd8b75741c05673f79bba90f1aa56709a2d2
parenta39a0b2fd0a024b4266245b79b342ec3e62d4c16 (diff)
Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891
https://bugzilla.redhat.com/show_bug.cgi?id=614511 Resolves: bug 614511 Bug description: Fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891 description: Catch possible NULL pointer in acl_operation_ext_destructor() and acl_init_aclpb().
-rw-r--r--ldap/servers/plugins/acl/acl_ext.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ldap/servers/plugins/acl/acl_ext.c b/ldap/servers/plugins/acl/acl_ext.c
index d9494ec3..fbe469fa 100644
--- a/ldap/servers/plugins/acl/acl_ext.c
+++ b/ldap/servers/plugins/acl/acl_ext.c
@@ -275,6 +275,11 @@ acl_operation_ext_destructor ( void *ext, void *object, void *parent )
(!(aclpb->aclpb_state & ACLPB_INITIALIZED)))
goto clean_aclpb;
+ if ( NULL == aclpb->aclpb_authorization_sdn ) {
+ slapi_log_error (SLAPI_LOG_FATAL, plugin_name, "NULL aclcb_autorization_sdn\n");
+ goto clean_aclpb;
+ }
+
/* get the connection extension */
aclcb = (struct acl_cblock *) acl_get_ext ( ACL_EXT_CONNECTION, parent );
@@ -316,7 +321,7 @@ acl_operation_ext_destructor ( void *ext, void *object, void *parent )
acl_copyEval_context ( NULL, c_evalContext, &aclcb->aclcb_eval_context, attr_only );
aclcb->aclcb_aclsignature = aclpb->aclpb_signature;
- if ( aclcb->aclcb_sdn && aclpb->aclpb_authorization_sdn &&
+ if ( aclcb->aclcb_sdn &&
(0 != slapi_sdn_compare ( aclcb->aclcb_sdn,
aclpb->aclpb_authorization_sdn ) ) ) {
slapi_sdn_set_ndn_byval( aclcb->aclcb_sdn,