From 17602fefdeddaf7c26d451f7e3350c43ccb9a0e9 Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Thu, 28 Jan 2021 17:33:22 +1300 Subject: [PATCH] fuzz:afl main: add a diagnostic message LLVMFuzzerTestOneInput() NEVER returns non-zero, but if it does, we might as well know what made it do so Signed-off-by: Douglas Bagnall Reviewed-by: Jeremy Allison --- lib/fuzzing/afl-fuzz-main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/fuzzing/afl-fuzz-main.c b/lib/fuzzing/afl-fuzz-main.c index e271ddb77c1..a7d97f0f670 100644 --- a/lib/fuzzing/afl-fuzz-main.c +++ b/lib/fuzzing/afl-fuzz-main.c @@ -38,6 +38,8 @@ int main(int argc, char *argv[]) { ret = LLVMFuzzerTestOneInput(buf, size); TALLOC_FREE(buf); if (ret != 0) { + printf("LLVMFuzzerTestOneInput returned %d on argument %d\n", + ret, i); return ret; } } -- 2.47.3