Skip to content

test(fuzz): add dedicated fuzz targets for rar2/rar3/rar5 - #120

Open
jdlien wants to merge 1 commit into
KarpelesLab:masterfrom
jdlien:rar-fuzz-targets
Open

test(fuzz): add dedicated fuzz targets for rar2/rar3/rar5#120
jdlien wants to merge 1 commit into
KarpelesLab:masterfrom
jdlien:rar-fuzz-targets

Conversation

@jdlien

@jdlien jdlien commented Jul 16, 2026

Copy link
Copy Markdown

CONTRIBUTING says every decoder gets a fuzz target, but the RAR decoders only had coverage via decoder_dispatch. This adds dedicated decoder_rar2/rar3/rar5 targets following the existing pattern (loop-guard, out-of-band params derived from an input prefix — unpack size capped at 1 MiB, rar5 window capped at 4 MiB). Registered in fuzz/Cargo.toml and the fuzz.yml matrix.

Smoke-ran each ~10 min locally (nightly + cargo-fuzz): no crashes/OOMs/timeouts.

CONTRIBUTING promises every decoder a fuzz target, but the RAR decoders
were only reachable through decoder_dispatch. Add one each, house pattern.
Since RAR streams do not self-delimit, each derives out-of-band params from
an input prefix (unpack size, rar3 E8 flag, rar5 window selector), capped at
1 MiB / 4 MiB so the fuzzer explores without gigabyte allocations. Registered
in fuzz/Cargo.toml and the fuzz.yml matrix.
@jdlien
jdlien force-pushed the rar-fuzz-targets branch from ef11c8d to ef71da0 Compare July 16, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant