Add fuzz target for cranelift_reader::parse_test.

This commit is contained in:
Corey Farwell
2018-07-24 09:59:21 -04:00
committed by Dan Gohman
parent eed861c6e1
commit 299898d494
2 changed files with 16 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
#![no_main]
#[macro_use]
extern crate libfuzzer_sys;
extern crate cranelift_reader;
use std::str;
fuzz_target!(|data: &[u8]| {
if let Ok(s) = str::from_utf8(data) {
let _ = cranelift_reader::parse_test(s);
}
});