mirror of
https://github.com/openharmony/third_party_rust_proc-macro2.git
synced 2026-07-01 20:24:03 -04:00
13 lines
249 B
Rust
13 lines
249 B
Rust
#![no_main]
|
|
|
|
use libfuzzer_sys::fuzz_target;
|
|
use std::str;
|
|
|
|
fuzz_target!(|bytes: &[u8]| {
|
|
if bytes.len() < 200 {
|
|
if let Ok(string) = str::from_utf8(bytes) {
|
|
_ = string.parse::<proc_macro2::TokenStream>();
|
|
}
|
|
}
|
|
});
|