summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2019-12-04 22:07:26 +1300
committerAndrew Bartlett <abartlet@samba.org>2019-12-10 07:50:28 +0000
commitf4ff9a079414953b17f49857ecfca6c0e479c32f (patch)
tree958ebe9aa51863739a7295442c123a13fcefd5eb
parent000d86f537866a3c83f06d7b128532119df45dd9 (diff)
downloadsamba-f4ff9a079414953b17f49857ecfca6c0e479c32f.tar.gz
lib/fuzzing: Also confirm we can make a string filter from the parsed tree in fuzz_ldb_parse_tree
This also avoids tree being an unused variable. This is similar to doing an ndr_push() in ndr_fuzz_X, it catches some of the cases where the parse is successful but the application code could misinterpret the structure. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
-rw-r--r--lib/fuzzing/fuzz_ldb_parse_tree.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/fuzzing/fuzz_ldb_parse_tree.c b/lib/fuzzing/fuzz_ldb_parse_tree.c
index f0f02148142..bbcdeab2e67 100644
--- a/lib/fuzzing/fuzz_ldb_parse_tree.c
+++ b/lib/fuzzing/fuzz_ldb_parse_tree.c
@@ -44,6 +44,8 @@ int LLVMFuzzerTestOneInput(uint8_t *buf, size_t len)
tree = ldb_parse_tree(mem_ctx, filter);
+ (void)ldb_filter_from_tree(tree, mem_ctx);
+
talloc_free(mem_ctx);
return 0;