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

Function LLVMFuzzerTestOneInput

test/fuzzing/fuzz_thrift.cpp:23–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21#define kMaxInputLength 4096
22
23extern "C" int
24LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
25{
26 if (size < kMinInputLength || size > kMaxInputLength){
27 return 1;
28 }
29
30 std::string input(reinterpret_cast<const char*>(data), size);
31 butil::IOBuf buf;
32 buf.append(input);
33
34 brpc::policy::ParseThriftMessage(&buf, NULL, false, NULL);
35 return 0;
36}

Callers

nothing calls this directly

Calls 2

ParseThriftMessageFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected