about summary refs log tree commit diff
path: root/src/afl-fuzz-stats.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/afl-fuzz-stats.c')
-rw-r--r--src/afl-fuzz-stats.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/afl-fuzz-stats.c b/src/afl-fuzz-stats.c
index 77bbe023..d9f8c99c 100644
--- a/src/afl-fuzz-stats.c
+++ b/src/afl-fuzz-stats.c
@@ -98,8 +98,8 @@ void write_stats_file(afl_state_t *afl, double bitmap_cvg, double stability,
       "exec_timeout      : %u\n"
       "slowest_exec_ms   : %u\n"
       "peak_rss_mb       : %lu\n"
+      "edges_found       : %u\n"
       "var_byte_count    : %u\n"
-      "found_edges       : %u\n"
       "afl_banner        : %s\n"
       "afl_version       : " VERSION
       "\n"
@@ -122,7 +122,7 @@ void write_stats_file(afl_state_t *afl, double bitmap_cvg, double stability,
 #else
       (unsigned long int)(rus.ru_maxrss >> 10),
 #endif
-      afl->var_byte_count, t_bytes, afl->use_banner,
+      t_bytes, afl->var_byte_count, afl->use_banner,
       afl->unicorn_mode ? "unicorn" : "", afl->qemu_mode ? "qemu " : "",
       afl->dumb_mode ? " dumb " : "", afl->no_forkserver ? "no_fsrv " : "",
       afl->crash_mode ? "crash " : "",
@@ -260,8 +260,8 @@ void show_stats(afl_state_t *afl) {
   t_bytes = count_non_255_bytes(afl->virgin_bits);
   t_byte_ratio = ((double)t_bytes * 100) / MAP_SIZE;
 
-  if (t_bytes)
-    stab_ratio = 100 - (((double)afl->var_byte_count) * 100) / t_bytes;
+  if (likely(t_bytes) && unlikely(afl->var_byte_count))
+    stab_ratio = 100 - (((double)afl->var_byte_count * 100) / t_bytes);
   else
     stab_ratio = 100;