mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-06-08 13:57:47 +02:00
14 lines
453 B
Rust
14 lines
453 B
Rust
|
#![no_main]
|
||
|
use filter_parser::FilterCondition;
|
||
|
use libfuzzer_sys::fuzz_target;
|
||
|
|
||
|
fuzz_target!(|data: &[u8]| {
|
||
|
if let Ok(s) = std::str::from_utf8(data) {
|
||
|
// When we are fuzzing the parser we can get stack overflow really easily.
|
||
|
// But since this doesn't happens with a normal build we are just going to limit the fuzzer to 500 characters.
|
||
|
if s.len() < 500 {
|
||
|
let _ = FilterCondition::parse(s);
|
||
|
}
|
||
|
}
|
||
|
});
|