diff --git a/Cargo.toml b/Cargo.toml index 657ea3f..6ee198e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,6 @@ [workspace] members = [ + "bson", "crypto-hashes", "cssparser", "flac", diff --git a/bson/Cargo.toml b/bson/Cargo.toml new file mode 100644 index 0000000..fe89d96 --- /dev/null +++ b/bson/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "bson-targets" +version = "0.0.0" +publish = false + +[dependencies] +bson = { git = "https://github.com/zonyitoo/bson-rs" } +libfuzzer-sys = { git = "https://github.com/rust-fuzz/libfuzzer-sys.git" } + +[[bin]] +name = "read_bson" +path = "read_bson.rs" diff --git a/bson/read_bson.rs b/bson/read_bson.rs new file mode 100644 index 0000000..8a26a55 --- /dev/null +++ b/bson/read_bson.rs @@ -0,0 +1,8 @@ +#![no_main] + +#[macro_use] extern crate libfuzzer_sys; +extern crate bson; + +fuzz_target!(|data| { + let _ = bson::decode_document(&mut std::io::Cursor::new(data)); +}); diff --git a/bson/seeds/0001 b/bson/seeds/0001 new file mode 100644 index 0000000..7b61956 Binary files /dev/null and b/bson/seeds/0001 differ