Skip to content

Commit 7c06875

Browse files
committed
Set up an (empty) fuzzing framework
1 parent da0f27f commit 7c06875

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

fuzz/Cargo.toml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
[package]
3+
name = "image-fuzz"
4+
version = "0.0.1"
5+
authors = ["Automatically generated"]
6+
edition = "2021"
7+
publish = false
8+
9+
[package.metadata]
10+
cargo-fuzz = true
11+
12+
[dependencies]
13+
image = { version = "0.25.5", default-features = false }
14+
15+
[dependencies.image-extras]
16+
path = ".."
17+
features = []
18+
[dependencies.libfuzzer-sys]
19+
version = "0.4"
20+
21+
# Temporarily needed for image-extras to build, see ../Cargo.toml
22+
[patch.crates-io]
23+
image = { git = "https://github.com/fintelia/image", branch = "decoding-hooks" }
24+
25+
# Prevent this from interfering with workspaces
26+
[workspace]
27+
members = ["."]

fuzz/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Fuzzing with libfuzzer
2+
3+
For the possibly more up-to-date guide see <https://fuzz.rs/book/cargo-fuzz/setup.html>.
4+
5+
> $ cargo install cargo-fuzz
6+
> $ cargo +nightly fuzz run fuzzer_script_<format>
7+
8+
# Bug reports
9+
10+
As explained in the project [README](../README.md), fuzzing is not a priority for
11+
this crate and decoders may panic or worse on malformed input. Please do not
12+
open issues for crashes found by fuzzing, though PRs fixing them are welcome.

0 commit comments

Comments
 (0)