fuzz_address.c (369B)
1 #include "lib/net/address.h" 2 #include "lib/malloc/malloc.h" 3 4 #include "test/fuzz/fuzzing.h" 5 6 int 7 fuzz_init(void) 8 { 9 return 0; 10 } 11 12 int 13 fuzz_cleanup(void) 14 { 15 return 0; 16 } 17 18 int 19 fuzz_main(const uint8_t *data, size_t sz) 20 { 21 tor_addr_t addr; 22 char *fuzzing_data = tor_memdup_nulterm(data, sz); 23 tor_addr_parse(&addr, fuzzing_data); 24 tor_free(fuzzing_data); 25 return 0; 26 }