diff options
author | h1994st <h1994st@gmail.com> | 2020-03-03 19:48:13 -0500 |
---|---|---|
committer | h1994st <h1994st@gmail.com> | 2020-03-03 19:48:13 -0500 |
commit | df465216583afcc0e65e4468e6383afd7a688ddc (patch) | |
tree | 84ee509f58fc76aee6f4ba9d0aa9e44f256f50e8 /src/afl-fuzz-mutators.c | |
parent | 90506479e7de57c97d97958c61b2513009687d90 (diff) | |
download | afl++-df465216583afcc0e65e4468e6383afd7a688ddc.tar.gz |
Finish refactoring APIs for the custom mutator and Python module
- Remove AFL_PYTHON_ONLY (env) and python_only (variable) - Unify fuzz API of the custom mutator and Python module - Merge the custom mutator into the old python_stage, which is now renamed to custom_mutator_stage
Diffstat (limited to 'src/afl-fuzz-mutators.c')
-rw-r--r-- | src/afl-fuzz-mutators.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/afl-fuzz-mutators.c b/src/afl-fuzz-mutators.c index 9365d487..26eaea59 100644 --- a/src/afl-fuzz-mutators.c +++ b/src/afl-fuzz-mutators.c @@ -27,6 +27,7 @@ void setup_custom_mutator(void) { + /* Try mutator library first */ u8* fn = getenv("AFL_CUSTOM_MUTATOR_LIBRARY"); if (fn) { @@ -41,6 +42,7 @@ void setup_custom_mutator(void) { return; } + /* Try Python module */ #ifdef USE_PYTHON u8* module_name = getenv("AFL_PYTHON_MODULE"); @@ -286,7 +288,7 @@ void load_custom_mutator_py(const char* module_name) { /* "afl_custom_fuzz" should not be NULL, but the interface of Python mutator is quite different from the custom mutator. */ - mutator->afl_custom_fuzz = NULL; + mutator->afl_custom_fuzz = fuzz_py; if (py_functions[PY_FUNC_PRE_SAVE]) mutator->afl_custom_pre_save = pre_save_py; |