summary refs log tree commit diff
path: root/http-parser/fuzzers/fuzz_url.c
blob: eca11a2edce55260a9a4a0931887e7b18dcc22a6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "http_parser.h"

int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
{
  struct http_parser_url u;
  http_parser_url_init(&u);
  http_parser_parse_url((char*)data, size, 0, &u);
  http_parser_parse_url((char*)data, size, 1, &u);

  return 0;
}