mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-15 11:28:08 +00:00
python mutator: fix nullptr for python mutator data
This commit is contained in:
@ -566,9 +566,6 @@ typedef struct afl_state {
|
|||||||
|
|
||||||
/* Custom mutators */
|
/* Custom mutators */
|
||||||
struct custom_mutator *mutator;
|
struct custom_mutator *mutator;
|
||||||
#ifdef USE_PYTHON
|
|
||||||
struct custom_mutator *py_mutator;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* cmplog forkserver ids */
|
/* cmplog forkserver ids */
|
||||||
s32 cmplog_fsrv_ctl_fd, cmplog_fsrv_st_fd;
|
s32 cmplog_fsrv_ctl_fd, cmplog_fsrv_st_fd;
|
||||||
|
@ -303,6 +303,7 @@ void load_custom_mutator_py(afl_state_t *afl, char *module_name) {
|
|||||||
|
|
||||||
py_mutator_t *py_mutator;
|
py_mutator_t *py_mutator;
|
||||||
py_mutator = init_py_module(afl, module_name);
|
py_mutator = init_py_module(afl, module_name);
|
||||||
|
afl->mutator->data = py_mutator;
|
||||||
if (!py_mutator) { FATAL("Failed to load python mutator."); }
|
if (!py_mutator) { FATAL("Failed to load python mutator."); }
|
||||||
|
|
||||||
PyObject **py_functions = py_mutator->py_functions;
|
PyObject **py_functions = py_mutator->py_functions;
|
||||||
|
Reference in New Issue
Block a user