Fuzzing for the json decoder
Hey it seems like it's working!
This commit is contained in:
parent
77cbf1700f
commit
e27b788e8f
4 changed files with 1595 additions and 0 deletions
4
fuzz/.gitignore
vendored
Normal file
4
fuzz/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
target
|
||||
corpus
|
||||
artifacts
|
||||
coverage
|
||||
1559
fuzz/Cargo.lock
generated
Normal file
1559
fuzz/Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
21
fuzz/Cargo.toml
Normal file
21
fuzz/Cargo.toml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
[package]
|
||||
name = "fwd-fuzz"
|
||||
version = "0.0.0"
|
||||
publish = false
|
||||
edition = "2021"
|
||||
|
||||
[package.metadata]
|
||||
cargo-fuzz = true
|
||||
|
||||
[dependencies]
|
||||
libfuzzer-sys = "0.4"
|
||||
|
||||
[dependencies.fwd]
|
||||
path = ".."
|
||||
|
||||
[[bin]]
|
||||
name = "fuzz_target_1"
|
||||
path = "fuzz_targets/fuzz_target_1.rs"
|
||||
test = false
|
||||
doc = false
|
||||
bench = false
|
||||
11
fuzz/fuzz_targets/fuzz_target_1.rs
Normal file
11
fuzz/fuzz_targets/fuzz_target_1.rs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#![no_main]
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
|
||||
extern crate fwd;
|
||||
use fwd::server::refresh::docker::JsonValue;
|
||||
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
// fuzzed code goes here
|
||||
let _ = JsonValue::parse(data);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue