diff options
author | vanhauser-thc <vh@thc.org> | 2022-07-19 12:24:03 +0200 |
---|---|---|
committer | vanhauser-thc <vh@thc.org> | 2022-07-19 12:24:03 +0200 |
commit | ca4a8c0f920f83c86aeb599b94b50fce2af68389 (patch) | |
tree | 0c59bc591d0c8991775c0db8655e4b9c5321b666 /src/afl-fuzz-python.c | |
parent | b847e0f414e7b310e1a68bc501d4e2453bfce70e (diff) | |
download | afl++-ca4a8c0f920f83c86aeb599b94b50fce2af68389.tar.gz |
post_process 0/NULL return support
Diffstat (limited to 'src/afl-fuzz-python.c')
-rw-r--r-- | src/afl-fuzz-python.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/afl-fuzz-python.c b/src/afl-fuzz-python.c index a3d864c3..a43d80bb 100644 --- a/src/afl-fuzz-python.c +++ b/src/afl-fuzz-python.c @@ -535,7 +535,16 @@ size_t post_process_py(void *py_mutator, u8 *buf, size_t buf_size, Py_DECREF(py_value); - *out_buf = (u8 *)py->post_process_buf.buf; + if (unlikely(py->post_process_buf.len == 0)) { + + *out_buf = NULL; + + } else { + + *out_buf = (u8 *)py->post_process_buf.buf; + + } + return py->post_process_buf.len; } else { |