fuzz_address.c 369 Bytes
Newer Older
pedbap's avatar
pedbap committed
1
2
3
#include "lib/net/address.h"
#include "lib/malloc/malloc.h"

pedbap's avatar
pedbap committed
4
5
#include "test/fuzz/fuzzing.h"

Nick Mathewson's avatar
Nick Mathewson committed
6
7
8
9
int
fuzz_init(void)
{
  return 0;
pedbap's avatar
pedbap committed
10
11
}

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

Nick Mathewson's avatar
Nick Mathewson committed
18
19
20
21
22
23
24
25
int
fuzz_main(const uint8_t *data, size_t sz)
{
  tor_addr_t addr;
  char *fuzzing_data = tor_memdup_nulterm(data, sz);
  tor_addr_parse(&addr, fuzzing_data);
  tor_free(fuzzing_data);
  return 0;
pedbap's avatar
pedbap committed
26
}