From 096851b61fa99df233176b090146efb52e524f48 Mon Sep 17 00:00:00 2001 From: David Lakin Date: Fri, 9 Aug 2024 11:01:34 -0400 Subject: [PATCH] Gracefully handle `PermissionError` exceptions that crash fuzzer Fuzzing inputs sometimes produce directory paths that are protected inside the fuzzer execution environment. This is not an issue in GitPython's code, so it should not crash the fuzzer. Fixes OSS-Fuzz Issue 69456: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=69870 --- fuzzing/fuzz-targets/fuzz_submodule.py | 1 + 1 file changed, 1 insertion(+) diff --git a/fuzzing/fuzz-targets/fuzz_submodule.py b/fuzzing/fuzz-targets/fuzz_submodule.py index 997133b70..c2bf1e4fe 100644 --- a/fuzzing/fuzz-targets/fuzz_submodule.py +++ b/fuzzing/fuzz-targets/fuzz_submodule.py @@ -78,6 +78,7 @@ def TestOneInput(data): IsADirectoryError, NotADirectoryError, BrokenPipeError, + PermissionError, ): return -1 except Exception as e: