python mutator: fix nullptr for python mutator data

This commit is contained in:
h1994st
2020-03-29 01:07:29 -04:00
committed by Dominik Maier
parent 71edae4a0f
commit 50fc7327f2
2 changed files with 1 additions and 3 deletions

View File

@ -566,9 +566,6 @@ typedef struct afl_state {
/* Custom mutators */
struct custom_mutator *mutator;
#ifdef USE_PYTHON
struct custom_mutator *py_mutator;
#endif
/* cmplog forkserver ids */
s32 cmplog_fsrv_ctl_fd, cmplog_fsrv_st_fd;

View File

@ -303,6 +303,7 @@ void load_custom_mutator_py(afl_state_t *afl, char *module_name) {
py_mutator_t *py_mutator;
py_mutator = init_py_module(afl, module_name);
afl->mutator->data = py_mutator;
if (!py_mutator) { FATAL("Failed to load python mutator."); }
PyObject **py_functions = py_mutator->py_functions;