mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-14 19:08:08 +00:00
custom mutator fix
This commit is contained in:
@ -76,6 +76,8 @@ fuzz_run_target(afl_state_t *afl, afl_forkserver_t *fsrv, u32 timeout) {
|
||||
u32 __attribute__((hot))
|
||||
write_to_testcase(afl_state_t *afl, void **mem, u32 len, u32 fix) {
|
||||
|
||||
u8 sent = 0;
|
||||
|
||||
if (unlikely(afl->custom_mutators_count)) {
|
||||
|
||||
ssize_t new_size = len;
|
||||
@ -140,12 +142,15 @@ write_to_testcase(afl_state_t *afl, void **mem, u32 len, u32 fix) {
|
||||
if (el->afl_custom_fuzz_send) {
|
||||
|
||||
el->afl_custom_fuzz_send(el->data, *mem, new_size);
|
||||
sent = 1;
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
} else {
|
||||
}
|
||||
|
||||
if (likely(!sent)) {
|
||||
|
||||
/* everything as planned. use the potentially new data. */
|
||||
afl_fsrv_write_to_testcase(&afl->fsrv, *mem, new_size);
|
||||
@ -172,12 +177,15 @@ write_to_testcase(afl_state_t *afl, void **mem, u32 len, u32 fix) {
|
||||
if (el->afl_custom_fuzz_send) {
|
||||
|
||||
el->afl_custom_fuzz_send(el->data, *mem, len);
|
||||
sent = 1;
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
} else {
|
||||
}
|
||||
|
||||
if (likely(!sent)) {
|
||||
|
||||
/* boring uncustom. */
|
||||
afl_fsrv_write_to_testcase(&afl->fsrv, *mem, len);
|
||||
|
Reference in New Issue
Block a user