1
0
Эх сурвалжийг харах

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().
Nathan Kinder 15 жил өмнө
parent
commit
b35cc7e0ff

+ 2 - 2
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;