From: Andrew Bartlett Date: Wed, 4 Dec 2019 09:07:26 +0000 (+1300) Subject: lib/fuzzing: Also confirm we can make a string filter from the parsed tree in fuzz_ld... X-Git-Tag: ldb-2.1.0~319 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4ff9a079414953b17f49857ecfca6c0e479c32f;p=thirdparty%2Fsamba.git 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 Reviewed-by: Douglas Bagnall --- 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;