X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=inline;f=fuzz%2Ffuzz_targets%2Fmsg_pong_target.rs;fp=fuzz%2Ffuzz_targets%2Fmsg_pong_target.rs;h=0000000000000000000000000000000000000000;hb=b2f31c5256513f0d9744af1c61aae04acbd7c701;hp=d4572d3306457f0672af9797625e45f2155392f9;hpb=bde48b2c158c4c2f0a9a21e192e2ed914dd2aa77;p=rust-lightning diff --git a/fuzz/fuzz_targets/msg_pong_target.rs b/fuzz/fuzz_targets/msg_pong_target.rs deleted file mode 100644 index d4572d33..00000000 --- a/fuzz/fuzz_targets/msg_pong_target.rs +++ /dev/null @@ -1,45 +0,0 @@ -// This file is auto-generated by gen_target.sh based on msg_target_template.txt -// To modify it, modify msg_target_template.txt and run gen_target.sh instead. - -extern crate lightning; - -use lightning::util::reset_rng_state; - -use lightning::ln::msgs::{MsgEncodable, MsgDecodable, Pong}; - -#[inline] -pub fn do_test(data: &[u8]) { - reset_rng_state(); - if let Ok(msg) = Pong::decode(data) { - let _ = msg.encode(); - } -} - -#[cfg(feature = "afl")] -#[macro_use] extern crate afl; -#[cfg(feature = "afl")] -fn main() { - fuzz!(|data| { - do_test(data); - }); -} - -#[cfg(feature = "honggfuzz")] -#[macro_use] extern crate honggfuzz; -#[cfg(feature = "honggfuzz")] -fn main() { - loop { - fuzz!(|data| { - do_test(data); - }); - } -} - -extern crate hex; -#[cfg(test)] -mod tests { - #[test] - fn duplicate_crash() { - super::do_test(&::hex::decode("00").unwrap()); - } -}