fuzz_addressPTR.c 611 Bytes
Newer Older
1
2
3
4
5
6
7
8
#include "lib/net/address.h"
#include "lib/net/socket.h"
#include "lib/cc/ctassert.h"
#include "lib/container/smartlist.h"
#include "lib/ctime/di_ops.h"
#include "lib/log/log.h"
#include "lib/log/escape.h"
#include "lib/malloc/malloc.h"
Nick Mathewson's avatar
Nick Mathewson committed
9
#include "lib/net/address.h"
pedbap's avatar
pedbap committed
10
11
#include "test/fuzz/fuzzing.h"

Nick Mathewson's avatar
Nick Mathewson committed
12
13
14
15
int
fuzz_init(void)
{
  return 0;
16
17
}

Nick Mathewson's avatar
Nick Mathewson committed
18
19
20
21
int
fuzz_cleanup(void)
{
  return 0;
22
23
}

Nick Mathewson's avatar
Nick Mathewson committed
24
25
26
27
28
29
30
31
int
fuzz_main(const uint8_t *data, size_t sz)
{
  tor_addr_t addr_result;
  char *fuzzing_data = tor_memdup_nulterm(data, sz);
  tor_addr_parse_PTR_name(&addr_result, fuzzing_data, AF_UNSPEC, 1);
  tor_free(fuzzing_data);
  return 0;
32
}