diff options
author | van Hauser <vh@thc.org> | 2020-05-09 11:35:54 +0200 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2020-05-09 11:35:54 +0200 |
commit | fa84e52af0cf1869a8abbff2f48a9c55e2d447d4 (patch) | |
tree | 3b6c6a565a8b39c88c14f1e30134268606a6915d /src/afl-fuzz-python.c | |
parent | cf9238e09d74791c93a3a50ef2460d96529bcfa1 (diff) | |
download | afl++-fa84e52af0cf1869a8abbff2f48a9c55e2d447d4.tar.gz |
custom mutator code enhancements and code-format
Diffstat (limited to 'src/afl-fuzz-python.c')
-rw-r--r-- | src/afl-fuzz-python.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/src/afl-fuzz-python.c b/src/afl-fuzz-python.c index a65add55..e90d91d1 100644 --- a/src/afl-fuzz-python.c +++ b/src/afl-fuzz-python.c @@ -295,9 +295,10 @@ void deinit_py(void *py_mutator) { } -struct custom_mutator * load_custom_mutator_py(afl_state_t *afl, char *module_name) { +struct custom_mutator *load_custom_mutator_py(afl_state_t *afl, + char * module_name) { - struct custom_mutator * mutator; + struct custom_mutator *mutator; mutator = ck_alloc(sizeof(struct custom_mutator)); mutator->pre_save_buf = NULL; @@ -313,17 +314,9 @@ struct custom_mutator * load_custom_mutator_py(afl_state_t *afl, char *module_na PyObject **py_functions = py_mutator->py_functions; - if (py_functions[PY_FUNC_INIT]) { + if (py_functions[PY_FUNC_INIT]) { mutator->afl_custom_init = unsupported; } - mutator->afl_custom_init = unsupported; - - } - - if (py_functions[PY_FUNC_DEINIT]) { - - mutator->afl_custom_deinit = deinit_py; - - } + 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. */ @@ -374,8 +367,6 @@ struct custom_mutator * load_custom_mutator_py(afl_state_t *afl, char *module_na } - - OKF("Python mutator '%s' installed successfully.", module_name); /* Initialize the custom mutator */ |