From 99402aa31cdbb5e8c4ca480ed4d1fc3a8fa7ae2a Mon Sep 17 00:00:00 2001 From: Martin Leitner-Ankerl Date: Thu, 19 Dec 2024 07:56:15 +0100 Subject: [PATCH] Fix overflow in execs_ps_last_min calculation last_avg_execs should be 64bit, same as total_execs, otherwise there is an overflow once total_execs reaches 2^32. Which can happen in practice for long-running fuzzing campaigns. --- include/afl-fuzz.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/afl-fuzz.h b/include/afl-fuzz.h index 0f0e45d3..070457c9 100644 --- a/include/afl-fuzz.h +++ b/include/afl-fuzz.h @@ -747,7 +747,7 @@ typedef struct afl_state { up to 256 */ unsigned long long int last_avg_exec_update; - u32 last_avg_execs; + u64 last_avg_execs; double last_avg_execs_saved; /* foreign sync */