about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2023-02-23 17:09:06 +0100
committervanhauser-thc <vh@thc.org>2023-02-23 17:09:06 +0100
commit2bea77e28a969fcb62921862bef61cd751d7b9d5 (patch)
tree8ec020c04ad3b7986f5bdedcf181a59902dbe9cb
parentadd2eb42c0f0e2b590fcb17427e5fce29c2fdd54 (diff)
downloadafl++-2bea77e28a969fcb62921862bef61cd751d7b9d5.tar.gz
fix custom python splice optout
-rw-r--r--src/afl-fuzz-python.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/afl-fuzz-python.c b/src/afl-fuzz-python.c
index 69c305f7..2799268b 100644
--- a/src/afl-fuzz-python.c
+++ b/src/afl-fuzz-python.c
@@ -231,8 +231,12 @@ static py_mutator_t *init_py_module(afl_state_t *afl, u8 *module_name) {
         PyObject_GetAttrString(py_module, "describe");
     py_functions[PY_FUNC_FUZZ_COUNT] =
         PyObject_GetAttrString(py_module, "fuzz_count");
-    if (!py_functions[PY_FUNC_FUZZ])
+    if (!py_functions[PY_FUNC_FUZZ]) {
+
       WARNF("fuzz function not found in python module");
+
+    }
+
     py_functions[PY_FUNC_POST_PROCESS] =
         PyObject_GetAttrString(py_module, "post_process");
     py_functions[PY_FUNC_INIT_TRIM] =
@@ -250,6 +254,7 @@ static py_mutator_t *init_py_module(afl_state_t *afl, u8 *module_name) {
         PyObject_GetAttrString(py_module, "fuzz_send");
     py_functions[PY_FUNC_SPLICE_OPTOUT] =
         PyObject_GetAttrString(py_module, "splice_optout");
+    if (py_functions[PY_FUNC_SPLICE_OPTOUT]) { afl->custom_splice_optout = 1; }
     py_functions[PY_FUNC_QUEUE_NEW_ENTRY] =
         PyObject_GetAttrString(py_module, "queue_new_entry");
     py_functions[PY_FUNC_INTROSPECTION] =