mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-14 19:08:08 +00:00
fix
This commit is contained in:
@ -460,6 +460,8 @@ u8 trim_case_custom(afl_state_t *afl, struct queue_entry *q, u8 *in_buf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
out_len = retlen;
|
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);
|
memcpy(out_buf, retbuf, retlen);
|
||||||
|
|
||||||
/* Tell the custom mutator that the trimming was successful */
|
/* Tell the custom mutator that the trimming was successful */
|
||||||
|
@ -1961,11 +1961,7 @@ custom_mutator_stage:
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* `(afl->)out_buf` may have been changed by the call to custom_fuzz
|
/* out_buf may have been changed by the call to custom_fuzz */
|
||||||
*/
|
|
||||||
/* TODO: Only do this when `mutated_buf` == `out_buf`? Branch vs
|
|
||||||
* Memcpy.
|
|
||||||
*/
|
|
||||||
memcpy(out_buf, in_buf, len);
|
memcpy(out_buf, in_buf, len);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -132,8 +132,7 @@ write_to_testcase(afl_state_t *afl, void **mem, u32 len, u32 fix) {
|
|||||||
|
|
||||||
if (new_mem != *mem) {
|
if (new_mem != *mem) {
|
||||||
|
|
||||||
*mem = afl_realloc(mem, new_size);
|
*mem = new_mem;
|
||||||
memcpy(*mem, new_mem, new_size);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user