Add packet parser fuzzer.
This commit is contained in:
parent
8b27330c8b
commit
3eaa96957c
|
@ -0,0 +1,3 @@
|
|||
target
|
||||
corpus
|
||||
artifacts
|
|
@ -0,0 +1,22 @@
|
|||
[package]
|
||||
name = "smoltcp-fuzz"
|
||||
version = "0.0.1"
|
||||
authors = ["Automatically generated"]
|
||||
publish = false
|
||||
|
||||
[package.metadata]
|
||||
cargo-fuzz = true
|
||||
|
||||
[dependencies.smoltcp]
|
||||
path = ".."
|
||||
|
||||
[dependencies.libfuzzer-sys]
|
||||
git = "https://github.com/rust-fuzz/libfuzzer-sys.git"
|
||||
|
||||
# Prevent this from interfering with workspaces
|
||||
[workspace]
|
||||
members = ["."]
|
||||
|
||||
[[bin]]
|
||||
name = "packet_parser"
|
||||
path = "fuzz_targets/packet_parser.rs"
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
#![no_main]
|
||||
#[macro_use] extern crate libfuzzer_sys;
|
||||
extern crate smoltcp;
|
||||
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
use smoltcp::wire::*;
|
||||
format!("{}", PrettyPrinter::<EthernetFrame<&'static [u8]>>::new("", &data));
|
||||
});
|
Loading…
Reference in New Issue