Quellcode durchsuchen

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 vor 10 Monaten
Ursprung
Commit
9b477bf4bc
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  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