diff options
Diffstat (limited to 'custom_mutators')
-rw-r--r-- | custom_mutators/gramatron/test.c | 23 | ||||
-rw-r--r-- | custom_mutators/symqemu/symqemu.c | 7 |
2 files changed, 17 insertions, 13 deletions
diff --git a/custom_mutators/gramatron/test.c b/custom_mutators/gramatron/test.c index 3577faa1..0dfbc197 100644 --- a/custom_mutators/gramatron/test.c +++ b/custom_mutators/gramatron/test.c @@ -8,8 +8,8 @@ state *create_pda(u8 *automaton_file) { struct json_object *parsed_json; - state *pda; - json_object *source_obj, *attr; + state * pda; + json_object * source_obj, *attr; int arraylen, ii, ii2, trigger_len, error; printf("\n[GF] Automaton file passed:%s", automaton_file); @@ -41,7 +41,7 @@ state *create_pda(u8 *automaton_file) { enum json_type type; json_object_object_foreach(source_obj, key, val) { - state *state_ptr; + state * state_ptr; trigger *trigger_ptr; int offset; @@ -97,12 +97,12 @@ state *create_pda(u8 *automaton_file) { void SanityCheck(char *automaton_path) { - state *pda = create_pda(automaton_path); + state * pda = create_pda(automaton_path); int count = 0, state; Get_Dupes_Ret *getdupesret; - IdxMap_new *statemap; - IdxMap_new *statemap_ptr; - terminal *term_ptr; + IdxMap_new * statemap; + IdxMap_new * statemap_ptr; + terminal * term_ptr; while (count < NUMINPUTS) { @@ -117,9 +117,12 @@ void SanityCheck(char *automaton_path) { int main(int argc, char *argv[]) { - char *mode; - char *automaton_path; - char *output_dir = NULL; + char * mode; + char * automaton_path; + char * output_dir = NULL; + struct timeval tv; + struct timeval tz; + // gettimeofday(&tv, &tz); srand(1337); if (argc == 3) { diff --git a/custom_mutators/symqemu/symqemu.c b/custom_mutators/symqemu/symqemu.c index b9912923..73a1640a 100644 --- a/custom_mutators/symqemu/symqemu.c +++ b/custom_mutators/symqemu/symqemu.c @@ -196,11 +196,12 @@ void afl_custom_splice_optout(void *data) { inline u64 get_cur_time(void) { - struct timespec spec; + struct timeval tv; + struct timezone tz; - clock_gettime(CLOCK_REALTIME, &spec); + gettimeofday(&tv, &tz); - return (spec.tv_sec * 1000ULL) + (spec.tv_nsec / 1000000ULL); + return (tv.tv_sec * 1000ULL) + (tv.tv_usec / 1000); } |