update custom trim
MODIFY
docs/custom_mutators.md
docs/custom_mutators.md
@@ -204,9 +204,7 @@ trimmed input. Here's a quick API description:
arguments because we already have the initial buffer from `init_trim` and we
can memorize the current state in the data variables. This can also save
reparsing steps for each iteration. It should return the trimmed input
- buffer, where the returned data must not exceed the initial input data in
- length. Returning anything that is larger than the original data (passed to
- `init_trim`) will result in a fatal abort of AFL++.
+ buffer.
- `post_trim` (optional)

MODIFY
src/afl-fuzz-mutators.c
src/afl-fuzz-mutators.c
@@ -339,7 +339,7 @@ u8 trim_case_custom(afl_state_t *afl, struct queue_entry *q, u8 *in_buf,
}
- while (afl->stage_cur < afl->stage_max) {
+ while (afl->stage_cur <= afl->stage_max) {
u8 *retbuf = NULL;

update custom trim