From 5fa0f8f55b82672315f69853beda3bee71d9991c Mon Sep 17 00:00:00 2001 From: Dominik Maier Date: Tue, 9 Jun 2020 17:01:41 +0200 Subject: fix debug output in stats --- src/afl-fuzz-stats.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'src/afl-fuzz-stats.c') diff --git a/src/afl-fuzz-stats.c b/src/afl-fuzz-stats.c index 8e364d54..374b2411 100644 --- a/src/afl-fuzz-stats.c +++ b/src/afl-fuzz-stats.c @@ -141,14 +141,26 @@ void write_stats_file(afl_state_t *afl, double bitmap_cvg, double stability, if (afl->debug) { + uint32_t i = 0; fprintf(f, "virgin_bytes :"); - for (uint32_t i = 0; i < afl->fsrv.map_size; i++) - if (afl->virgin_bits[i] != 0xff) + for (i = 0; i < afl->fsrv.map_size; i++) { + + if (afl->virgin_bits[i] != 0xff) { + fprintf(f, " %d[%02x]", i, afl->virgin_bits[i]); + + } + + } + fprintf(f, "\n"); fprintf(f, "var_bytes :"); - for (uint32_t i = 0; i < afl->fsrv.map_size; i++) - if (afl->var_bytes[i]) fprintf(f, " %d", i); + for (i = 0; i < afl->fsrv.map_size; i++) { + + if (afl->var_bytes[i]) { fprintf(f, " %d", i); } + + } + fprintf(f, "\n"); } -- cgit 1.4.1