Coverage Report

Created: 2025-08-26 06:50

/src/http-parser/fuzzers/fuzz_parser.c
Line
Count
Source
1
#include <stdint.h>
2
#include <stdlib.h>
3
#include <string.h>
4
#include "http_parser.h"
5
6
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
7
4.28k
{
8
4.28k
  static const http_parser_settings settings_null = {
9
4.28k
    .on_message_begin = 0
10
4.28k
    , .on_header_field = 0
11
4.28k
    ,.on_header_value = 0
12
4.28k
    ,.on_url = 0
13
4.28k
    ,.on_status = 0
14
4.28k
    ,.on_body = 0
15
4.28k
    ,.on_headers_complete = 0
16
4.28k
    ,.on_message_complete = 0
17
4.28k
    ,.on_chunk_header = 0
18
4.28k
    ,.on_chunk_complete = 0
19
4.28k
  };
20
21
4.28k
  http_parser parser;
22
4.28k
  http_parser_init(&parser, HTTP_BOTH);
23
4.28k
  http_parser_execute(&parser, &settings_null, (char*)data, size);
24
25
4.28k
  return 0;
26
4.28k
}