From: Douglas Bagnall Date: Thu, 21 Mar 2024 01:48:34 +0000 (+1300) Subject: fuzz:fuzz_ndr_X: don't skip printing on push error X-Git-Tag: tdb-1.4.11~1376 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=842e7378439fcf354260c98b9ea7dadf59c601c7;p=thirdparty%2Fsamba.git fuzz:fuzz_ndr_X: don't skip printing on push error push should not have changed the struct, so it is valid to try to print it also. Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/lib/fuzzing/fuzz_ndr_X.c b/lib/fuzzing/fuzz_ndr_X.c index d6b7d7c51d9..99332608414 100644 --- a/lib/fuzzing/fuzz_ndr_X.c +++ b/lib/fuzzing/fuzz_ndr_X.c @@ -312,8 +312,14 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { pull_push_print_flags, st); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { - TALLOC_FREE(mem_ctx); - return 0; + /* + * Note we aren't bailing here. + * + * It is good that ndr_push returned an error, because + * the structure is no doubt rubbish. But that doesn't + * mean we don't also want to see if ndr_print can + * handle it. + */ } {