diff options
Diffstat (limited to 'fuzz/fuzz.rs')
| -rw-r--r-- | fuzz/fuzz.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fuzz/fuzz.rs b/fuzz/fuzz.rs index fd01914..8fadc86 100644 --- a/fuzz/fuzz.rs +++ b/fuzz/fuzz.rs @@ -41,6 +41,10 @@ pub unsafe extern "C" fn LLVMFuzzerTestOneInput(input: *const u8, len: usize) -> Err(_) => return -1, }; + if !str.chars().all(|c| c.is_ascii_graphic()) { + return -1; + } + let atom = str.trim(); let mut stdin = PY_PROCESS.stdin.lock().expect("failed to get stdin lock"); |
