Explorar o código

Return `-1` if fuzzer data triggers an expected exception

This tells LibFuzzer that the input should not be added to the fuzz
target corpus. We do not want to add expected error triggers to the
corpus; instead we want to have a corpus consisting of inputs known to
trigger more interesting code paths.
David Lakin hai 10 meses
pai
achega
9b477bf4bc
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      fuzzing/fuzz-targets/fuzz_bundle.py

+ 1 - 1
fuzzing/fuzz-targets/fuzz_bundle.py

@@ -39,7 +39,7 @@ def TestOneInput(data):
             "unsupported bundle format header",
         ]
         if is_expected_exception(expected_exceptions, e):
-            return
+            return -1
         else:
             raise e