Files
http-parser/fuzzers/fuzz_url.c
David Korczynski eefbf87c47 Add another fuzzer for the urls.
PR-URL: https://github.com/nodejs/http-parser/pull/508
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
2020-04-28 19:49:13 +02:00

15 lines
322 B
C

#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;
}