if no master is present a slave becomes a temporary master

This commit is contained in:
van Hauser
2020-05-19 19:51:54 +02:00
parent ae6c30a711
commit 25fbec6638
3 changed files with 49 additions and 30 deletions

View File

@ -232,8 +232,8 @@ static void edit_params(int argc, char **argv) {
}
modified_file =
alloc_printf("%s/.afl-%u-%u-%u.s", tmp_dir, (u32)getpid(), (u32)time(NULL), (u32)random());
modified_file = alloc_printf("%s/.afl-%u-%u-%u.s", tmp_dir, (u32)getpid(),
(u32)time(NULL), (u32)random());
wrap_things_up:
@ -592,8 +592,8 @@ int main(int argc, char **argv) {
rand_seed = tv.tv_sec ^ tv.tv_usec ^ getpid();
// in fast systems where pids can repeat in the same seconds we need this
for (i = 1; i < argc; i++)
for (j = 0; j < strlen(argv[i]); j++)
rand_seed += argv[i][j];
for (j = 0; j < strlen(argv[i]); j++)
rand_seed += argv[i][j];
srandom(rand_seed);