mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-14 02:58:08 +00:00
fix custom mutator only check
This commit is contained in:
@ -1746,33 +1746,6 @@ int main(int argc, char **argv_orig, char **envp) {
|
|||||||
check_if_tty(afl);
|
check_if_tty(afl);
|
||||||
if (afl->afl_env.afl_force_ui) { afl->not_on_tty = 0; }
|
if (afl->afl_env.afl_force_ui) { afl->not_on_tty = 0; }
|
||||||
|
|
||||||
if (afl->afl_env.afl_custom_mutator_only) {
|
|
||||||
|
|
||||||
if (!afl->custom_mutators_count) {
|
|
||||||
|
|
||||||
if (afl->shm.cmplog_mode) {
|
|
||||||
|
|
||||||
WARNF(
|
|
||||||
"No custom mutator loaded, using AFL_CUSTOM_MUTATOR_ONLY is "
|
|
||||||
"pointless and only allowed now to allow experiments with CMPLOG.");
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
FATAL(
|
|
||||||
"No custom mutator loaded but AFL_CUSTOM_MUTATOR_ONLY specified.");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/* This ensures we don't proceed to havoc/splice */
|
|
||||||
afl->custom_only = 1;
|
|
||||||
|
|
||||||
/* Ensure we also skip all deterministic steps */
|
|
||||||
afl->skip_deterministic = 1;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
get_core_count(afl);
|
get_core_count(afl);
|
||||||
|
|
||||||
atexit(at_exit);
|
atexit(at_exit);
|
||||||
@ -1872,6 +1845,33 @@ int main(int argc, char **argv_orig, char **envp) {
|
|||||||
|
|
||||||
setup_custom_mutators(afl);
|
setup_custom_mutators(afl);
|
||||||
|
|
||||||
|
if (afl->afl_env.afl_custom_mutator_only) {
|
||||||
|
|
||||||
|
if (!afl->custom_mutators_count) {
|
||||||
|
|
||||||
|
if (afl->shm.cmplog_mode) {
|
||||||
|
|
||||||
|
WARNF(
|
||||||
|
"No custom mutator loaded, using AFL_CUSTOM_MUTATOR_ONLY is "
|
||||||
|
"pointless and only allowed now to allow experiments with CMPLOG.");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
FATAL(
|
||||||
|
"No custom mutator loaded but AFL_CUSTOM_MUTATOR_ONLY specified.");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This ensures we don't proceed to havoc/splice */
|
||||||
|
afl->custom_only = 1;
|
||||||
|
|
||||||
|
/* Ensure we also skip all deterministic steps */
|
||||||
|
afl->skip_deterministic = 1;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (afl->limit_time_sig > 0 && afl->custom_mutators_count) {
|
if (afl->limit_time_sig > 0 && afl->custom_mutators_count) {
|
||||||
|
|
||||||
if (afl->custom_only) {
|
if (afl->custom_only) {
|
||||||
|
Reference in New Issue
Block a user