reject fuzz inputs with invisible characters

This commit is contained in:
John Turner
2025-11-17 22:45:41 +00:00
parent 63db65b2f0
commit dc47258841

View File

@@ -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");