summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Kinder <nkinder@redhat.com>2010-09-14 09:21:36 -0700
committerNathan Kinder <nkinder@redhat.com>2010-09-15 09:11:05 -0700
commitb35cc7e0ff07244f8e4eb2a0a41435ce83174c39 (patch)
tree34ae14543a4cfd2b9dce694f0a1d933dfbc37e37
parentff41170172f721a651eb3e00f676b7228f611b9d (diff)
downloadds-b35cc7e0ff07244f8e4eb2a0a41435ce83174c39.tar.gz
ds-b35cc7e0ff07244f8e4eb2a0a41435ce83174c39.tar.xz
ds-b35cc7e0ff07244f8e4eb2a0a41435ce83174c39.zip
Bug 630097 - (cov#12182,12183) NULL dereference in import code
The entry pointer that is passed to slapi_entry_attr_find() is dereferenced by that function without a check for NULL. We should check if ep->ep_entry is NULL before calling slapi_entry_attr_find().
-rw-r--r--ldap/servers/slapd/back-ldbm/import-threads.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ldap/servers/slapd/back-ldbm/import-threads.c b/ldap/servers/slapd/back-ldbm/import-threads.c
index 1d490546..171be087 100644
--- a/ldap/servers/slapd/back-ldbm/import-threads.c
+++ b/ldap/servers/slapd/back-ldbm/import-threads.c
@@ -634,7 +634,7 @@ import_producer(void *param)
}
ep = import_make_backentry(e, id);
- if (!ep) {
+ if ((ep == NULL) || (ep->ep_entry == NULL)) {
slapi_entry_free(e);
goto error;
}
@@ -2734,7 +2734,7 @@ static int bulk_import_queue(ImportJob *job, Slapi_Entry *entry)
/* make into backentry */
ep = import_make_backentry(entry, id);
- if (!ep) {
+ if ((ep == NULL) || (ep->ep_entry == NULL)) {
import_abort_all(job, 1);
PR_Unlock(job->wire_lock);
return -1;