Răsfoiți Sursa

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 luni în urmă
părinte
comite
9b477bf4bc
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  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