ldap/servers/plugins/acl/aclplugin.c | 6 ++++++
ldap/servers/slapd/tools/mmldif.c | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
New commits:
commit b83f966e5ce1d5a3e70521b15f92b9f6ba988b1c
Author: Nathan Kinder <nkinder(a)redhat.com>
Date: Wed Sep 15 13:31:24 2010 -0700
Bug 630097 - (cov#15477) NULL dereference in ACL plug-in code
We need to check if aclpb is NULL before dereferencing it. The
proper thing to do here is to make aclplugin_preop_common() return
an error to the LDAP client and to return 1 since the whole purpose
of this function is to initialize the aclpb. Doing this will avoid
the NULL dereference.
diff --git a/ldap/servers/plugins/acl/aclplugin.c b/ldap/servers/plugins/acl/aclplugin.c
index 873c524..d54250d 100644
--- a/ldap/servers/plugins/acl/aclplugin.c
+++ b/ldap/servers/plugins/acl/aclplugin.c
@@ -205,6 +205,12 @@ aclplugin_preop_common( Slapi_PBlock *pb )
aclpb = acl_get_aclpb ( pb, ACLPB_BINDDN_PBLOCK );
+ if (aclpb == NULL) {
+ slapi_log_error( SLAPI_LOG_ACL, plugin_name, "aclplugin_preop_common: Error: aclpb
is NULL\n" );
+ slapi_send_ldap_result( pb, LDAP_OPERATIONS_ERROR, NULL, NULL, 0, NULL );
+ return 1;
+ }
+
/* See if we have initialized already */
if ( aclpb->aclpb_state & ACLPB_INITIALIZED ) goto done;
commit 470e2c70338440f69b0ab8fc02128fe5f204af3e
Author: Nathan Kinder <nkinder(a)redhat.com>
Date: Wed Sep 15 11:45:56 2010 -0700
Bug 630097 - (cov#11938) NULL dereference in mmldif
There is a chance that a can be NULL, which we then dereference
within the else block. We should not execute the else block if
a is NULL.
diff --git a/ldap/servers/slapd/tools/mmldif.c b/ldap/servers/slapd/tools/mmldif.c
index 665452c..b364a19 100644
--- a/ldap/servers/slapd/tools/mmldif.c
+++ b/ldap/servers/slapd/tools/mmldif.c
@@ -1108,7 +1108,7 @@ addmodified(FILE * edf3, attrib1_t * attrib, record_t * first)
} while (num_b <= tot_b && stricmp(attribname(b), attrname) ==
0);
fprintf(edf3, "-\n");
continue;
- } else {
+ } else if (a != NULL) {
/* a == b */
int nmods = 0;
attrib_t *begin_b = b;
Show replies by date