Skip to content

Commit 7126ce1

Browse files
committed
Fuzzing: Gracefully Handle Uninteresting Error to Fix OSS-Fuzz Issue 71095
Fuzzing data can generate filenames that trigger: > OSError: [Errno 36] File name too long The changes here add handling for these exceptions because they di not indicate a bug and should not crash the fuzzer. a
1 parent e57cc2c commit 7126ce1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: fuzzing/fuzz-targets/fuzz_submodule.py

+2
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ def TestOneInput(data):
8484
except Exception as e:
8585
if isinstance(e, ValueError) and "embedded null byte" in str(e):
8686
return -1
87+
elif isinstance(e, OSError) and "File name too long" in str(e):
88+
return -1
8789
else:
8890
return handle_exception(e)
8991

0 commit comments

Comments
 (0)