aboutsummaryrefslogtreecommitdiffstats
path: root/fuzz/fuzz_targets/binary_reader.rs
diff options
context:
space:
mode:
authorEdward Barnard2018-03-24 19:41:36 +0000
committerEdward Barnard2018-03-24 19:41:36 +0000
commit33571d053ee2fa167eb99572a3cef9450ef47ecf (patch)
treecc98bd98232c688979d9f6329edae5babe3e9c2c /fuzz/fuzz_targets/binary_reader.rs
parent07fc48983b7b518653008c380a4d6b101c21cbdb (diff)
downloadrust-plist-33571d053ee2fa167eb99572a3cef9450ef47ecf.tar.bz2
Update cargo-fuzz.
Diffstat (limited to 'fuzz/fuzz_targets/binary_reader.rs')
-rw-r--r--fuzz/fuzz_targets/binary_reader.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/fuzz/fuzz_targets/binary_reader.rs b/fuzz/fuzz_targets/binary_reader.rs
new file mode 100644
index 0000000..6cd2ab9
--- /dev/null
+++ b/fuzz/fuzz_targets/binary_reader.rs
@@ -0,0 +1,13 @@
+#![no_main]
+#[macro_use] extern crate libfuzzer_sys;
+extern crate plist;
+
+use std::io::Cursor;
+use plist::Plist;
+use plist::binary::EventReader;
+
+fuzz_target!(|data: &[u8]| {
+ let cursor = Cursor::new(data);
+ let reader = EventReader::new(cursor);
+ let _ = Plist::from_events(reader);
+});