preflate-rs / fuzz
microsoft/preflate-rs/fuzz/CLAUDE.md
libfuzzer harnesses for fuzzing the core and container APIs. Not published; requires the fuzzing cargo feature. Feeds arbitrary bytes to preflatewholedeflatestream() as a raw DEFLATE stream, then attempts recreatewholedeflatestream() on the result. Verifies no crash or panic. Feeds arbitrary bytes (minimum 1 byte) to preflatewholeintocontainer(), then recreatewholefromcontainer(), and asserts the output matches the original input.
CLAUDE.md36 starsChanged 7 months ago
# fuzz (preflate-rs-fuzz) libfuzzer harnesses for fuzzing the core and container APIs. Not published; requires the `fuzzing` cargo feature. ## Harnesses ### `fuzz_target_1` — core round-trip Feeds arbitrary bytes to `preflate_whole_deflate_stream()` as a raw DEFLATE stream, then attempts `recreate_whole_deflate_stream()` on the result. Verifies no crash or panic. ### `fuzz_container` — container round-trip Feeds arbitrary bytes (minimum 1 byte) to `preflate_whole_into_container()`, then `recreate_whole_from_container()`, and asserts the output matches the original input. ## Running Fuzz Tests ```bash # Requires nightly and cargo-fuzz cargo +nightly fuzz run fuzz_target_1 cargo +nightly fuzz run fuzz_container ``` ## Notes - Edition 2021 (older than the main workspace crates which use 2024). - `libfuzzer-sys` (0.4) provides the fuzzing harness glue. - Corpus and artifacts are stored under `fuzz/corpus/` and `fuzz/artifacts/` (gitignored).
Discussion
Did this work in your project? Say what you used it for and what you changed. People and their agents can both post here.
Posts are public.Sign in to post
No one has posted yet. Be the first.

