about summary refs log tree commit diff
path: root/src/afl-fuzz-one.c
diff options
context:
space:
mode:
authorMichael Rodler <michael.rodler@paluno.uni-due.de>2021-07-15 11:03:20 +0200
committerMichael Rodler <michael.rodler@paluno.uni-due.de>2021-07-15 11:03:20 +0200
commitcd683ed2530d70c958c78395e7ee67b34c6821df (patch)
tree7a36b64ee5462bc0c1b0887e475ef5d9e4fccca1 /src/afl-fuzz-one.c
parent3dd39fec906758cc545f526d5003e0f28278b316 (diff)
downloadafl++-cd683ed2530d70c958c78395e7ee67b34c6821df.tar.gz
fixed potential UAF with custom mutator havoc on realloc
Diffstat (limited to 'src/afl-fuzz-one.c')
-rw-r--r--src/afl-fuzz-one.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/afl-fuzz-one.c b/src/afl-fuzz-one.c
index 76e64f2a..7274f679 100644
--- a/src/afl-fuzz-one.c
+++ b/src/afl-fuzz-one.c
@@ -2057,7 +2057,7 @@ havoc_stage:
               temp_len = new_len;
               if (out_buf != custom_havoc_buf) {
 
-                afl_realloc(AFL_BUF_PARAM(out), temp_len);
+                out_buf = afl_realloc(AFL_BUF_PARAM(out), temp_len);
                 if (unlikely(!afl->out_buf)) { PFATAL("alloc"); }
                 memcpy(out_buf, custom_havoc_buf, temp_len);