ptmgr: Add a fuzzer for ptmessage.
This commit is contained in:
parent
a8b96534be
commit
42fefe021d
|
@ -0,0 +1,3 @@
|
|||
target
|
||||
corpus
|
||||
artifacts
|
|
@ -0,0 +1,25 @@
|
|||
[package]
|
||||
name = "tor-ptmgr-fuzz"
|
||||
version = "0.0.0"
|
||||
authors = ["Automatically generated"]
|
||||
publish = false
|
||||
edition = "2018"
|
||||
|
||||
[package.metadata]
|
||||
cargo-fuzz = true
|
||||
|
||||
[dependencies]
|
||||
libfuzzer-sys = "0.4"
|
||||
|
||||
[dependencies.tor-ptmgr]
|
||||
path = ".."
|
||||
|
||||
# Prevent this from interfering with workspaces
|
||||
[workspace]
|
||||
members = ["."]
|
||||
|
||||
[[bin]]
|
||||
name = "ptmessage"
|
||||
path = "fuzz_targets/ptmessage.rs"
|
||||
test = false
|
||||
doc = false
|
|
@ -0,0 +1,8 @@
|
|||
#![no_main]
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use std::str::FromStr;
|
||||
use tor_ptmgr::ipc::PtMessage;
|
||||
|
||||
fuzz_target!(|data: &str| {
|
||||
let _ = PtMessage::from_str(data);
|
||||
});
|
Loading…
Reference in New Issue