MCPcopy Create free account
hub / github.com/apache/trafficserver / LLVMFuzzerTestOneInput

Function LLVMFuzzerTestOneInput

tests/fuzzing/fuzz_hpack.cc:36–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34extern int cmd_disable_pfreelist;
35
36extern "C" int
37LLVMFuzzerTestOneInput(const uint8_t *input_data, size_t size_data)
38{
39 if (size_data < kMinInputLength || size_data > kMaxInputLength) {
40 return 0;
41 }
42
43 cmd_disable_pfreelist = true;
44
45 hpack_huffman_init();
46
47 HpackIndexingTable indexing_table(INITIAL_TABLE_SIZE);
48 std::unique_ptr<HTTPHdr> headers(new HTTPHdr);
49 headers->create(HTTP_TYPE_REQUEST);
50
51 hpack_decode_header_block(indexing_table, headers.get(), input_data, size_data, MAX_REQUEST_HEADER_SIZE, MAX_TABLE_SIZE);
52
53 headers->destroy();
54
55 return 0;
56}

Callers

nothing calls this directly

Calls 5

hpack_huffman_initFunction · 0.85
createMethod · 0.45
getMethod · 0.45
destroyMethod · 0.45

Tested by

no test coverage detected