diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/afl-analyze.c | 3 | ||||
-rw-r--r-- | src/afl-fuzz.c | 7 | ||||
-rw-r--r-- | src/afl-tmin.c | 3 |
3 files changed, 9 insertions, 4 deletions
diff --git a/src/afl-analyze.c b/src/afl-analyze.c index 60ea0968..f1c141d5 100644 --- a/src/afl-analyze.c +++ b/src/afl-analyze.c @@ -66,11 +66,12 @@ static u8 *in_file, /* Analyzer input test case */ static u8 *in_data; /* Input data for analysis */ static u32 in_len, /* Input data length */ - orig_cksum, /* Original checksum */ total_execs, /* Total number of execs */ exec_hangs, /* Total number of hangs */ exec_tmout = EXEC_TIMEOUT; /* Exec timeout (ms) */ +static u64 orig_cksum; /* Original checksum */ + static u64 mem_limit = MEM_LIMIT; /* Memory limit (MB) */ static s32 dev_null_fd = -1; /* FD to /dev/null */ diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c index e1401757..46862613 100644 --- a/src/afl-fuzz.c +++ b/src/afl-fuzz.c @@ -820,13 +820,16 @@ int main(int argc, char **argv_orig, char **envp) { } if (afl->init_seed) { + afl->rand_seed[0] = afl->init_seed; afl->rand_seed[1] = afl->init_seed ^ 0x1234567890abcdef; afl->rand_seed[2] = afl->init_seed & 0x0123456789abcdef; afl->rand_seed[3] = afl->init_seed | 0x01abcde43f567908; + } - //srandom((u32)afl->init_seed); - //srand((u32)afl->init_seed); // in case it is a different implementation + + // srandom((u32)afl->init_seed); + // srand((u32)afl->init_seed); // in case it is a different implementation if (afl->use_radamsa) { diff --git a/src/afl-tmin.c b/src/afl-tmin.c index 13fee660..609f61d1 100644 --- a/src/afl-tmin.c +++ b/src/afl-tmin.c @@ -67,12 +67,13 @@ static u8 *in_file, /* Minimizer input test case */ static u8 *in_data; /* Input data for trimming */ static u32 in_len, /* Input data length */ - orig_cksum, /* Original checksum */ missed_hangs, /* Misses due to hangs */ missed_crashes, /* Misses due to crashes */ missed_paths, /* Misses due to exec path diffs */ map_size = MAP_SIZE; +static u64 orig_cksum; /* Original checksum */ + static u8 crash_mode, /* Crash-centric mode? */ hang_mode, /* Minimize as long as it hangs */ exit_crash, /* Treat non-zero exit as crash? */ |