Przeglądaj źródła

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 10 miesięcy temu
rodzic
commit
9b477bf4bc
1 zmienionych plików z 1 dodań i 1 usunięć
  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