mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-14 02:58:08 +00:00
Replace gettimeofday with clock_gettime (#2159)
This commit is contained in:
@ -555,8 +555,7 @@ int main(int argc, char **argv_orig, char **envp) {
|
||||
char *frida_afl_preload = NULL;
|
||||
char **use_argv;
|
||||
|
||||
struct timeval tv;
|
||||
struct timezone tz;
|
||||
struct timespec spec;
|
||||
|
||||
doc_path = access(DOC_PATH, F_OK) != 0 ? (u8 *)"docs" : (u8 *)DOC_PATH;
|
||||
|
||||
@ -603,8 +602,8 @@ int main(int argc, char **argv_orig, char **envp) {
|
||||
SAYF(cCYA "afl-fuzz" VERSION cRST
|
||||
" based on afl by Michal Zalewski and a large online community\n");
|
||||
|
||||
gettimeofday(&tv, &tz);
|
||||
rand_set_seed(afl, tv.tv_sec ^ tv.tv_usec ^ getpid());
|
||||
clock_gettime(CLOCK_REALTIME, &spec);
|
||||
rand_set_seed(afl, spec.tv_sec ^ spec.tv_nsec ^ getpid());
|
||||
|
||||
afl->shmem_testcase_mode = 1; // we always try to perform shmem fuzzing
|
||||
|
||||
|
Reference in New Issue
Block a user