reworked formatting in order to avoid gcc 8.3.0 warnings

This commit is contained in:
hexcoder-
2021-04-16 21:57:44 +02:00
parent 6e75832082
commit 495cbd42b7

View File

@ -427,7 +427,7 @@ void show_stats(afl_state_t *afl) {
u32 t_bytes, t_bits;
u32 banner_len, banner_pad;
u8 tmp[256], tmp2[256];
u8 tmp[256];
u8 time_tmp[64];
u8 val_buf[8][STRINGIFY_VAL_SIZE_MAX];
@ -1003,27 +1003,32 @@ void show_stats(afl_state_t *afl) {
if (unlikely(afl->afl_env.afl_custom_mutator_library)) {
sprintf(tmp2, "%s %s/%s,", tmp,
u_stringify_int(IB(2), afl->stage_finds[STAGE_PYTHON]),
u_stringify_int(IB(3), afl->stage_cycles[STAGE_PYTHON]));
strcat(tmp, " ");
strcat(tmp, u_stringify_int(IB(2), afl->stage_finds[STAGE_PYTHON]));
strcat(tmp, "/");
strcat(tmp, u_stringify_int(IB(3), afl->stage_cycles[STAGE_PYTHON]));
strcat(tmp, ",");
} else {
sprintf(tmp2, "%s unused,", tmp);
strcat(tmp, " unused,");
}
if (unlikely(afl->shm.cmplog_mode)) {
sprintf(tmp, "%s %s/%s, %s/%s", tmp2,
u_stringify_int(IB(4), afl->stage_finds[STAGE_COLORIZATION]),
u_stringify_int(IB(5), afl->stage_cycles[STAGE_COLORIZATION]),
u_stringify_int(IB(6), afl->stage_finds[STAGE_ITS]),
u_stringify_int(IB(7), afl->stage_cycles[STAGE_ITS]));
strcat(tmp, " ");
strcat(tmp, u_stringify_int(IB(4), afl->stage_finds[STAGE_COLORIZATION]));
strcat(tmp, "/");
strcat(tmp, u_stringify_int(IB(5), afl->stage_cycles[STAGE_COLORIZATION]));
strcat(tmp, ", ");
strcat(tmp, u_stringify_int(IB(6), afl->stage_finds[STAGE_ITS]));
strcat(tmp, "/");
strcat(tmp, u_stringify_int(IB(7), afl->stage_cycles[STAGE_ITS]));
} else {
sprintf(tmp, "%s unused, unused", tmp2);
strcat(tmp, " unused, unused");
}