diff options
author | van Hauser <vh@thc.org> | 2024-05-16 09:14:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-16 09:14:15 +0200 |
commit | a2e0163cc1c3503081c5c4c0d6312e69a7b5e95a (patch) | |
tree | f4c92e041d62f13d2358e77ff69e95a2201b5187 | |
parent | 1db3b81d2eb855167dcf65734f8833a2329609da (diff) | |
parent | 0cf78b77483887004bdf376c92918cded913bb70 (diff) | |
download | afl++-a2e0163cc1c3503081c5c4c0d6312e69a7b5e95a.tar.gz |
Merge pull request #2091 from bet4it/collect_coverage
Fix bug of `afl-showmap` in `collect_coverage` mode
-rw-r--r-- | src/afl-showmap.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/afl-showmap.c b/src/afl-showmap.c index 07a4844a..4ce01444 100644 --- a/src/afl-showmap.c +++ b/src/afl-showmap.c @@ -178,7 +178,7 @@ fsrv_run_result_t fuzz_run_target(afl_state_t *afl, afl_forkserver_t *fsrv, void classify_counts(afl_forkserver_t *fsrv) { u8 *mem = fsrv->trace_bits; - const u8 *map = binary_mode ? count_class_binary : count_class_human; + const u8 *map = (binary_mode || collect_coverage) ? count_class_binary : count_class_human; u32 i = map_size; @@ -242,9 +242,6 @@ static void analyze_results(afl_forkserver_t *fsrv) { if (fsrv->trace_bits[i]) { - total += fsrv->trace_bits[i]; - if (fsrv->trace_bits[i] > highest) highest = fsrv->trace_bits[i]; - // if (!coverage_map[i]) { coverage_map[i] = 1; } coverage_map[i] |= fsrv->trace_bits[i]; } @@ -1677,7 +1674,6 @@ int main(int argc, char **argv_orig, char **envp) { if ((coverage_map = (u8 *)malloc(map_size + 64)) == NULL) FATAL("coult not grab memory"); edges_only = false; - raw_instr_output = true; } |