mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-16 11:58:08 +00:00
real fix plus code format
This commit is contained in:
@ -1027,7 +1027,7 @@ void perform_dry_run(afl_state_t *afl) {
|
||||
|
||||
struct queue_entry *p = afl->queue;
|
||||
|
||||
if (!p->disabled && !p->was_fuzzed) {
|
||||
if (!p->was_fuzzed) {
|
||||
|
||||
--afl->pending_not_fuzzed;
|
||||
--afl->active_paths;
|
||||
@ -1128,16 +1128,6 @@ restart_outer_cull_loop:
|
||||
if (!p->cal_failed && p->exec_cksum == q->exec_cksum) {
|
||||
|
||||
duplicates = 1;
|
||||
if (!p->disabled && !q->disabled && !p->was_fuzzed && !q->was_fuzzed) {
|
||||
|
||||
--afl->pending_not_fuzzed;
|
||||
afl->active_paths--;
|
||||
|
||||
} else {
|
||||
|
||||
FATAL("disabled entry? this should not happen, please report!");
|
||||
|
||||
}
|
||||
|
||||
// We do not remove any of the memory allocated because for
|
||||
// splicing the data might still be interesting.
|
||||
@ -1147,6 +1137,14 @@ restart_outer_cull_loop:
|
||||
// we keep the shorter file
|
||||
if (p->len >= q->len) {
|
||||
|
||||
if (!p->was_fuzzed) {
|
||||
|
||||
p->was_fuzzed = 1;
|
||||
--afl->pending_not_fuzzed;
|
||||
afl->active_paths--;
|
||||
|
||||
}
|
||||
|
||||
p->disabled = 1;
|
||||
p->perf_score = 0;
|
||||
q->next = p->next;
|
||||
@ -1154,6 +1152,14 @@ restart_outer_cull_loop:
|
||||
|
||||
} else {
|
||||
|
||||
if (!q->was_fuzzed) {
|
||||
|
||||
q->was_fuzzed = 1;
|
||||
--afl->pending_not_fuzzed;
|
||||
afl->active_paths--;
|
||||
|
||||
}
|
||||
|
||||
q->disabled = 1;
|
||||
q->perf_score = 0;
|
||||
if (prev)
|
||||
|
@ -317,7 +317,7 @@ static u8 check_if_text(afl_state_t *afl, struct queue_entry *q) {
|
||||
|
||||
if (q->len < AFL_TXT_MIN_LEN) return 0;
|
||||
|
||||
u8 *buf;
|
||||
u8 * buf;
|
||||
int fd;
|
||||
u32 len = q->len, offset = 0, ascii = 0, utf8 = 0;
|
||||
ssize_t comp;
|
||||
|
@ -339,7 +339,7 @@ int main(int argc, char **argv_orig, char **envp) {
|
||||
afl_state_init(afl, map_size);
|
||||
afl->debug = debug;
|
||||
afl_fsrv_init(&afl->fsrv);
|
||||
if (debug) { afl->fsrv.debug = true ; }
|
||||
if (debug) { afl->fsrv.debug = true; }
|
||||
|
||||
read_afl_environment(afl, envp);
|
||||
if (afl->shm.map_size) { afl->fsrv.map_size = afl->shm.map_size; }
|
||||
|
@ -317,8 +317,16 @@ static void showmap_run_target_forkserver(afl_forkserver_t *fsrv, u8 *mem,
|
||||
|
||||
}
|
||||
|
||||
if (fsrv->trace_bits[0] == 1) { fsrv->trace_bits[0] = 0; have_coverage = 1; }
|
||||
else { have_coverage = 0; }
|
||||
if (fsrv->trace_bits[0] == 1) {
|
||||
|
||||
fsrv->trace_bits[0] = 0;
|
||||
have_coverage = 1;
|
||||
|
||||
} else {
|
||||
|
||||
have_coverage = 0;
|
||||
|
||||
}
|
||||
|
||||
if (!no_classify) { classify_counts(fsrv); }
|
||||
|
||||
@ -493,8 +501,16 @@ static void showmap_run_target(afl_forkserver_t *fsrv, char **argv) {
|
||||
|
||||
}
|
||||
|
||||
if (fsrv->trace_bits[0] == 1) { fsrv->trace_bits[0] = 0; have_coverage = 1; }
|
||||
else { have_coverage = 0; }
|
||||
if (fsrv->trace_bits[0] == 1) {
|
||||
|
||||
fsrv->trace_bits[0] = 0;
|
||||
have_coverage = 1;
|
||||
|
||||
} else {
|
||||
|
||||
have_coverage = 0;
|
||||
|
||||
}
|
||||
|
||||
if (!no_classify) { classify_counts(fsrv); }
|
||||
|
||||
|
Reference in New Issue
Block a user