Ver Fonte

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 há 10 meses atrás
pai
commit
9b477bf4bc
1 ficheiros alterados com 1 adições e 1 exclusões
  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