Skip to content

Commit

Permalink
Merge pull request #51 from killercup/add/bson
Browse files Browse the repository at this point in the history
Add fuzz target for bson crate
  • Loading branch information
frewsxcv authored Mar 15, 2017
2 parents a00fcd8 + 8cb1829 commit d9a731c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[workspace]
members = [
"bson",
"crypto-hashes",
"cssparser",
"dns-parser",
Expand Down
12 changes: 12 additions & 0 deletions bson/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
8 changes: 8 additions & 0 deletions bson/read_bson.rs
Original file line number Diff line number Diff line change
@@ -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));
});
Binary file added bson/seeds/0001
Binary file not shown.

0 comments on commit d9a731c

Please sign in to comment.