Merge branch 'maint-0.4.8'
[tor.git] / src / test / fuzz / fuzz_addressPTR.c
blobb503d536664904555ebf8905f2c8b682f28cd03e
1 #include "lib/net/address.h"
2 #include "lib/net/socket.h"
3 #include "lib/cc/ctassert.h"
4 #include "lib/container/smartlist.h"
5 #include "lib/ctime/di_ops.h"
6 #include "lib/log/log.h"
7 #include "lib/log/escape.h"
8 #include "lib/malloc/malloc.h"
9 #include "lib/net/address.h"
10 #include "test/fuzz/fuzzing.h"
12 int
13 fuzz_init(void)
15 return 0;
18 int
19 fuzz_cleanup(void)
21 return 0;
24 int
25 fuzz_main(const uint8_t *data, size_t sz)
27 tor_addr_t addr_result;
28 char *fuzzing_data = tor_memdup_nulterm(data, sz);
29 tor_addr_parse_PTR_name(&addr_result, fuzzing_data, AF_UNSPEC, 1);
30 tor_free(fuzzing_data);
31 return 0;