CVE-2019-3824 ldb: Add tests for ldb_wildcard_match
authorGary Lockyer <gary@catalyst.net.nz>
Mon, 18 Feb 2019 21:24:38 +0000 (10:24 +1300)
committerStefan Metzmacher <metze@samba.org>
Tue, 26 Feb 2019 12:00:12 +0000 (13:00 +0100)
commit21a449892743994487f70dd67914f87cd83e4fc1
tree78b1dd9d3a6c5c429740dc258aa1c5f0566f0c75
parentaecd14f8bdc00519c981f17d398df3054fcab9da
CVE-2019-3824 ldb: Add tests for ldb_wildcard_match

Add cmocka tests for ldb_wildcard_match.

Running test_wildcard_match under valgrind reproduces
 CVE-2019-3824 out of bounds read in wildcard compare (bug 13773)

 valgrind --suppressions=lib/ldb/tests/ldb_match_test.valgrind\
          bin/ldb_match_test

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13773

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 45b75db50f5c1a7c8c38af59a62fccee5401c845)
lib/ldb/tests/ldb_match_test.c [new file with mode: 0644]
lib/ldb/tests/ldb_match_test.valgrind [new file with mode: 0644]
lib/ldb/wscript