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

Function LLVMFuzzerTestOneInput

test/fuzzing/fuzz_json.cpp:24–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22#define kMaxInputLength 1024
23
24extern "C" int
25LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
26{
27 if (size < kMinInputLength || size > kMaxInputLength){
28 return 1;
29 }
30
31 std::string error;
32 JsonContextBody jsondata;
33 std::string input_data((char *)data,size);
34 json2pb::JsonToProtoMessage(input_data, &jsondata, &error);
35
36 return 0;
37}

Callers

nothing calls this directly

Calls 1

JsonToProtoMessageFunction · 0.50

Tested by

no test coverage detected