From 5f3cbb5f0b19a3db2657659709e3a8377b6dd26a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 21 Oct 2009 22:33:58 +1100 Subject: s4-ldb: when taking a list intersection, the result can be as long as the first list Intuitively you would think it couldn't be longer than the minimum of the two lists, but we are deliberately allowing for duplicates at this level of the indexing code, which means the result can be longer --- source4/lib/ldb/ldb_tdb/ldb_index.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4') diff --git a/source4/lib/ldb/ldb_tdb/ldb_index.c b/source4/lib/ldb/ldb_tdb/ldb_index.c index 73bf40442a..709a2e1626 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_index.c +++ b/source4/lib/ldb/ldb_tdb/ldb_index.c @@ -518,7 +518,7 @@ static bool list_intersect(struct ldb_context *ldb, 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; -- cgit