act on invalid AFL_CUSTOM_MUTATOR_ONLY usage

This commit is contained in:
vanhauser-thc
2023-05-18 14:45:45 +02:00
parent eec2c38a68
commit 53a869b757

View File

@ -1748,6 +1748,23 @@ int main(int argc, char **argv_orig, char **envp) {
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;