aboutsummaryrefslogtreecommitdiffstats
path: root/fuzz/fuzzers/binary_reader.rs
diff options
context:
space:
mode:
authorEdward Barnard2017-03-06 21:07:19 +0000
committerEdward Barnard2017-03-06 21:07:19 +0000
commite322e26b7e8c3dbfcba5c6142ca7559b63fc1652 (patch)
treecd80c7ac9c3e170eadf5fc5ab928a77f06e57219 /fuzz/fuzzers/binary_reader.rs
parent62977a504825f12126aa53c3d5cd8affc95c4a7c (diff)
downloadrust-plist-e322e26b7e8c3dbfcba5c6142ca7559b63fc1652.tar.bz2
Fuzz the binary and xml parsers separately.
Diffstat (limited to 'fuzz/fuzzers/binary_reader.rs')
-rw-r--r--fuzz/fuzzers/binary_reader.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/fuzz/fuzzers/binary_reader.rs b/fuzz/fuzzers/binary_reader.rs
index 800ca21..4956694 100644
--- a/fuzz/fuzzers/binary_reader.rs
+++ b/fuzz/fuzzers/binary_reader.rs
@@ -4,9 +4,11 @@ extern crate plist;
use std::io::Cursor;
use plist::Plist;
+use plist::binary::EventReader;
#[export_name="rust_fuzzer_test_input"]
pub extern fn go(data: &[u8]) {
let cursor = Cursor::new(data);
- let _ = Plist::read(cursor);
+ let reader = EventReader::new(cursor);
+ let _ = Plist::from_events(reader);
}