mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-11 09:41:35 +00:00
fix custom trim for increasing data
This commit is contained in:
parent
b41ea92a67
commit
86a8ef168d
@ -397,8 +397,14 @@ u8 trim_case_custom(afl_state_t *afl, struct queue_entry *q, u8 *in_buf,
|
|||||||
|
|
||||||
if (likely(retlen && cksum == q->exec_cksum)) {
|
if (likely(retlen && cksum == q->exec_cksum)) {
|
||||||
|
|
||||||
q->len = retlen;
|
if (afl_realloc((void **)&in_buf, retlen) == NULL) {
|
||||||
|
|
||||||
|
FATAL("can not allocate memory for trim");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
memcpy(in_buf, retbuf, retlen);
|
memcpy(in_buf, retbuf, retlen);
|
||||||
|
q->len = retlen;
|
||||||
|
|
||||||
/* Let's save a clean trace, which will be needed by
|
/* Let's save a clean trace, which will be needed by
|
||||||
update_bitmap_score once we're done with the trimming stuff. */
|
update_bitmap_score once we're done with the trimming stuff. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user