summaryrefslogtreecommitdiff
path: root/lib/ldb/wscript
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2019-08-26 13:04:07 +1200
committerKarolin Seeger <kseeger@samba.org>2019-09-04 08:31:24 +0000
commit9c677a274d49026105c72c5b4767b1d88eff77fa (patch)
tree2281c4cda58d1d149e61c79737096b6686b0acd4 /lib/ldb/wscript
parent57f00784ffac527a0f9b830339bba24784f2e294 (diff)
downloadsamba-9c677a274d49026105c72c5b4767b1d88eff77fa.tar.gz
ldb: Correct Pigeonhole principle validation in ldb_filter_attrs()
Thankfully this only fails if the DB is corrupt and has a duplicate record. The test was at the wrong end of the loop, and was for the wrong boundary condition. A write after the end of the array would occour before the condition was hit. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13695 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> (cherry picked from commit b1eec5b196e3d5a5716a5c74cf669ceaa5c0301f)
Diffstat (limited to 'lib/ldb/wscript')
-rw-r--r--lib/ldb/wscript5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/ldb/wscript b/lib/ldb/wscript
index a63a6c2171f..f928e2c739c 100644
--- a/lib/ldb/wscript
+++ b/lib/ldb/wscript
@@ -512,6 +512,11 @@ def build(bld):
deps='cmocka ldb ldb_tdb_err_map',
install=False)
+ bld.SAMBA_BINARY('ldb_filter_attrs_test',
+ source='tests/ldb_filter_attrs_test.c',
+ deps='cmocka ldb ldb_tdb_err_map',
+ install=False)
+
bld.SAMBA_BINARY('ldb_key_value_sub_txn_tdb_test',
bld.SUBDIR('ldb_key_value',
'''ldb_kv_search.c