diff options
author | Dustin Spicuzza <dustin@virtualroadside.com> | 2020-11-14 19:54:51 -0500 |
---|---|---|
committer | Dustin Spicuzza <dustin@virtualroadside.com> | 2020-11-14 19:58:32 -0500 |
commit | ea689076b330c46223ed1c36f9b02fc319c798f8 (patch) | |
tree | 391ea5096dd9fbde668809491cb0a9e04a609746 /src | |
parent | 3ac953ec33c02de90ff746d4a27d750d8e0e4bac (diff) | |
download | afl++-ea689076b330c46223ed1c36f9b02fc319c798f8.tar.gz |
Actually make python 'fuzz' method optional
At some point mutator->afl_custom_fuzz was allowed to be NULL, so do that instead of crashing
Diffstat (limited to 'src')
-rw-r--r-- | src/afl-fuzz-python.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/afl-fuzz-python.c b/src/afl-fuzz-python.c index 596b733e..cfaf055d 100644 --- a/src/afl-fuzz-python.c +++ b/src/afl-fuzz-python.c @@ -329,9 +329,7 @@ struct custom_mutator *load_custom_mutator_py(afl_state_t *afl, if (py_functions[PY_FUNC_DEINIT]) { mutator->afl_custom_deinit = deinit_py; } - /* "afl_custom_fuzz" should not be NULL, but the interface of Python mutator - is quite different from the custom mutator. */ - mutator->afl_custom_fuzz = fuzz_py; + if (py_functions[PY_FUNC_FUZZ]) { mutator->afl_custom_fuzz = fuzz_py; } if (py_functions[PY_FUNC_POST_PROCESS]) { |