Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port random fuzzing parameters to AFLplusplus #1

Open
wants to merge 8 commits into
base: stable
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/afl-fuzz.c
Original file line number Diff line number Diff line change
Expand Up @@ -1352,6 +1352,17 @@ int main(int argc, char **argv_orig, char **envp) {
if (getenv("AFL_DISABLE_FAVS")) afl->disable_afl_default_favorites = 1;
if (getenv("AFL_DISABLE_RP")) afl->disable_randomized_fuzzing_params = 1;

// initialize with default values if we don't want to radomize ruzzing params
if (afl->disable_randomized_fuzzing_params) {
afl->custom_havoc_cycles = HAVOC_CYCLES;
afl->custom_havoc_stack_pow2 = HAVOC_STACK_POW2;
afl->custom_havoc_blk_small = HAVOC_BLK_SMALL;
afl->custom_havok_blk_medium = HAVOC_BLK_MEDIUM;
afl->custom_havoc_blk_large = HAVOC_BLK_LARGE;
afl->custom_splice_cycles = SPLICE_CYCLES;
afl->custom_splice_havoc = SPLICE_HAVOC;
}

if (getenv("AFL_RP_PROB")) {
afl->randomize_parameters_prob = strtoul(getenv("AFL_RP_PROB"), 0L, 10);
}
Expand Down