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

Function LLVMFuzzerTestOneInput

tests/fuzzing/fuzz_proxy_protocol.cc:27–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25#define kMaxInputLength 1024
26
27extern "C" int
28LLVMFuzzerTestOneInput(const uint8_t *input_data, size_t size_data)
29{
30 if (size_data < kMinInputLength || size_data > kMaxInputLength) {
31 return 1;
32 }
33
34 swoc::TextView tv(reinterpret_cast<char *>((char *)input_data), size_data);
35
36 DiagsPtr::set(new Diags("fuzzing", "", "", nullptr));
37
38 ProxyProtocol pp_info;
39 proxy_protocol_parse(&pp_info, tv);
40
41 delete diags();
42
43 return 0;
44}

Callers

nothing calls this directly

Calls 3

setFunction · 0.85
proxy_protocol_parseFunction · 0.85
diagsFunction · 0.85

Tested by

no test coverage detected