s4-ldb: when taking a list intersection, the result can be as long as the first list
[ira/wip.git] / source4 / lib / ldb / ldb_tdb / ldb_index.c
index 73bf40442a470dda2040386d9cb7faee7b88693a..709a2e1626df067e7b154c31e1d0e60ea0fdd554 100644 (file)
@@ -518,7 +518,7 @@ static bool list_intersect(struct ldb_context *ldb,
                return false;
        }
 
                return false;
        }
 
-       list3->dn = talloc_array(list3, struct ldb_val, MIN(list->count, list2->count));
+       list3->dn = talloc_array(list3, struct ldb_val, list->count);
        if (!list3->dn) {
                talloc_free(list3);
                return false;
        if (!list3->dn) {
                talloc_free(list3);
                return false;