summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_tdb/ldb_index.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-10-21 22:33:58 +1100
committerAndrew Tridgell <tridge@samba.org>2009-10-22 12:47:53 +1100
commit5f3cbb5f0b19a3db2657659709e3a8377b6dd26a (patch)
treedd4b18d4690cd9090f9363c1195b41bf31ee68d8 /source4/lib/ldb/ldb_tdb/ldb_index.c
parent859cf72692f7daecbecb80559ebccc0d44087365 (diff)
downloadsamba-5f3cbb5f0b19a3db2657659709e3a8377b6dd26a.tar.gz
samba-5f3cbb5f0b19a3db2657659709e3a8377b6dd26a.tar.bz2
samba-5f3cbb5f0b19a3db2657659709e3a8377b6dd26a.zip
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
Diffstat (limited to 'source4/lib/ldb/ldb_tdb/ldb_index.c')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_index.c2
1 files changed, 1 insertions, 1 deletions
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;