MCPcopy Create free account
hub / github.com/MultiFuzz/MultiFuzz / log2_max_extensions

Function log2_max_extensions

hail-fuzz/src/extension.rs:395–405  ·  view source on GitHub ↗

Determine the maximum number of length extensions to apply to try.

(fuzzer: &Fuzzer)

Source from the content-addressed store, hash-verified

393
394/// Determine the maximum number of length extensions to apply to try.
395fn log2_max_extensions(fuzzer: &Fuzzer) -> u32 {
396 let max_find_gap =
397 fuzzer.input_id.map(|id| fuzzer.corpus[id].metadata.max_find_gap).unwrap_or(0);
398 match max_find_gap {
399 ..=1000 => 2,
400 ..=10000 => 3,
401 ..=100000 => 4,
402 ..=1000000 => 5,
403 _ => 6,
404 }
405}
406
407/// Determine the maximum size of a single extension to try. The idea is to try small extensions
408/// first to avoid inputs becoming too large. This number increases the longer it takes to find

Callers 1

startMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected