Add fuzzer running on parse_query

This commit is contained in:
5225225 2022-08-08 00:48:00 +01:00 committed by Sunli
parent b237512564
commit 89688faee8
3 changed files with 34 additions and 0 deletions

3
parser/fuzz/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
target
corpus
artifacts

25
parser/fuzz/Cargo.toml Normal file
View File

@ -0,0 +1,25 @@
[package]
name = "async-graphql-parser-fuzz"
version = "0.0.0"
authors = ["Automatically generated"]
publish = false
edition = "2018"
[package.metadata]
cargo-fuzz = true
[dependencies]
libfuzzer-sys = "0.4"
[dependencies.async-graphql-parser]
path = ".."
# Prevent this from interfering with workspaces
[workspace]
members = ["."]
[[bin]]
name = "parse_query"
path = "fuzz_targets/parse_query.rs"
test = false
doc = false

View File

@ -0,0 +1,6 @@
#![no_main]
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: &str| {
async_graphql_parser::parse_query(data);
});