mirror of
https://github.com/imjasonh/nescript
synced 2026-07-08 00:45:38 +00:00
11 lines
263 B
Rust
11 lines
263 B
Rust
|
|
#![no_main]
|
||
|
|
|
||
|
|
use libfuzzer_sys::fuzz_target;
|
||
|
|
|
||
|
|
fuzz_target!(|data: &[u8]| {
|
||
|
|
// The parser must never panic — always produce an AST or diagnostics.
|
||
|
|
if let Ok(source) = std::str::from_utf8(data) {
|
||
|
|
let _ = nescript::parser::parse(source);
|
||
|
|
}
|
||
|
|
});
|