mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-15 11:28:08 +00:00
fix foreign sync naming
This commit is contained in:
@ -770,6 +770,7 @@ typedef struct afl_state {
|
|||||||
#define FOREIGN_SYNCS_MAX 32U
|
#define FOREIGN_SYNCS_MAX 32U
|
||||||
u8 foreign_sync_cnt;
|
u8 foreign_sync_cnt;
|
||||||
struct foreign_sync foreign_syncs[FOREIGN_SYNCS_MAX];
|
struct foreign_sync foreign_syncs[FOREIGN_SYNCS_MAX];
|
||||||
|
char *foreign_file;
|
||||||
|
|
||||||
#ifdef _AFL_DOCUMENT_MUTATIONS
|
#ifdef _AFL_DOCUMENT_MUTATIONS
|
||||||
u8 do_document;
|
u8 do_document;
|
||||||
|
@ -317,8 +317,16 @@ u8 *describe_op(afl_state_t *afl, u8 new_bits, size_t max_description_len) {
|
|||||||
|
|
||||||
if (unlikely(afl->syncing_party)) {
|
if (unlikely(afl->syncing_party)) {
|
||||||
|
|
||||||
|
if (unlikely(afl->foreign_file)) {
|
||||||
|
|
||||||
|
sprintf(ret, "sync:%s,src:%.20s", afl->syncing_party, afl->foreign_file);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
sprintf(ret, "sync:%s,src:%06u", afl->syncing_party, afl->syncing_case);
|
sprintf(ret, "sync:%s,src:%06u", afl->syncing_party, afl->syncing_case);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
sprintf(ret, "src:%06u", afl->current_entry);
|
sprintf(ret, "src:%06u", afl->current_entry);
|
||||||
|
@ -653,8 +653,9 @@ void read_foreign_testcases(afl_state_t *afl, int first) {
|
|||||||
u32 len = write_to_testcase(afl, (void **)&mem, st.st_size, 1);
|
u32 len = write_to_testcase(afl, (void **)&mem, st.st_size, 1);
|
||||||
fault = fuzz_run_target(afl, &afl->fsrv, afl->fsrv.exec_tmout);
|
fault = fuzz_run_target(afl, &afl->fsrv, afl->fsrv.exec_tmout);
|
||||||
afl->syncing_party = foreign_name;
|
afl->syncing_party = foreign_name;
|
||||||
|
afl->foreign_file = nl[i]->d_name;
|
||||||
afl->queued_imported += save_if_interesting(afl, mem, len, fault);
|
afl->queued_imported += save_if_interesting(afl, mem, len, fault);
|
||||||
afl->syncing_party = 0;
|
|
||||||
munmap(mem, st.st_size);
|
munmap(mem, st.st_size);
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
||||||
@ -679,6 +680,9 @@ void read_foreign_testcases(afl_state_t *afl, int first) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
afl->foreign_file = NULL;
|
||||||
|
afl->syncing_party = 0;
|
||||||
|
|
||||||
if (first) {
|
if (first) {
|
||||||
|
|
||||||
afl->last_find_time = 0;
|
afl->last_find_time = 0;
|
||||||
|
Reference in New Issue
Block a user