Merge pull request #1064 from mqf20/warn_afl_fuzz_stats_paths_total

Warn if `paths_total` property from `fuzzer_stats` file is inconsistent
This commit is contained in:
van Hauser
2021-08-10 11:12:18 +02:00
committed by GitHub

View File

@ -147,8 +147,19 @@ void load_stats_file(afl_state_t *afl) {
afl->fsrv.total_execs = strtoull(lptr, &nptr, 10); afl->fsrv.total_execs = strtoull(lptr, &nptr, 10);
break; break;
case 10: case 10:
if (!strcmp(keystring, "paths_total ")) if (!strcmp(keystring, "paths_total ")) {
afl->queued_paths = strtoul(lptr, &nptr, 10);
u32 paths_total = strtoul(lptr, &nptr, 10);
if (paths_total != afl->queued_paths) {
WARNF(
"queue/ has been modified -- things might not work, you're "
"on your own!");
}
}
break; break;
case 12: case 12:
if (!strcmp(keystring, "paths_found ")) if (!strcmp(keystring, "paths_found "))