Skip to content

Commit 5a352ad

Browse files
Merge pull request #2276 from martinus/dev
Fix overflow in execs_ps_last_min calculation
2 parents af44b07 + 9afba51 commit 5a352ad

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/afl-fuzz.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ typedef struct afl_state {
747747
up to 256 */
748748

749749
unsigned long long int last_avg_exec_update;
750-
u32 last_avg_execs;
750+
u64 last_avg_total_execs;
751751
double last_avg_execs_saved;
752752

753753
/* foreign sync */

src/afl-fuzz-stats.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,9 +340,9 @@ void write_stats_file(afl_state_t *afl, u32 t_bytes, double bitmap_cvg,
340340
cur_time - afl->last_avg_exec_update >= 60000))) {
341341

342342
afl->last_avg_execs_saved =
343-
(double)(1000 * (afl->fsrv.total_execs - afl->last_avg_execs)) /
343+
(double)(1000 * (afl->fsrv.total_execs - afl->last_avg_total_execs)) /
344344
(double)(cur_time - afl->last_avg_exec_update);
345-
afl->last_avg_execs = afl->fsrv.total_execs;
345+
afl->last_avg_total_execs = afl->fsrv.total_execs;
346346
afl->last_avg_exec_update = cur_time;
347347

348348
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy