diff options
author | van Hauser <vh@thc.org> | 2022-05-16 12:34:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-16 12:34:38 +0200 |
commit | a2eb1f14126cffd046c44d5e87e945ed2699cec5 (patch) | |
tree | 2eecf55a92eec04e67aa3a9d9bec8e5f50659de6 /src/afl-fuzz-mutators.c | |
parent | c7bb0a9638a8929a5b664f16032c23a55a84be70 (diff) | |
parent | c08eeb95ca78625cf3f8a96bd04320c57c50d0f1 (diff) | |
download | afl++-a2eb1f14126cffd046c44d5e87e945ed2699cec5.tar.gz |
Merge pull request #1404 from AFLplusplus/dev
push to stable
Diffstat (limited to 'src/afl-fuzz-mutators.c')
-rw-r--r-- | src/afl-fuzz-mutators.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/afl-fuzz-mutators.c b/src/afl-fuzz-mutators.c index e78e2dc4..9407adfb 100644 --- a/src/afl-fuzz-mutators.c +++ b/src/afl-fuzz-mutators.c @@ -428,7 +428,7 @@ u8 trim_case_custom(afl_state_t *afl, struct queue_entry *q, u8 *in_buf, if (likely(retlen)) { - retlen = write_to_testcase(afl, retbuf, retlen, 0); + retlen = write_to_testcase(afl, (void **)&retbuf, retlen, 0); fault = fuzz_run_target(afl, &afl->fsrv, afl->fsrv.exec_tmout); ++afl->trim_execs; @@ -460,6 +460,8 @@ u8 trim_case_custom(afl_state_t *afl, struct queue_entry *q, u8 *in_buf, } out_len = retlen; + // TODO are we sure that retbuf fits into out_buf if retbuf can actually + // increase in size? memcpy(out_buf, retbuf, retlen); /* Tell the custom mutator that the trimming was successful */ |