| 22 | #define kMaxInputLength 4096 |
| 23 | |
| 24 | extern "C" int |
| 25 | LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) |
| 26 | { |
| 27 | if (size < kMinInputLength || size > kMaxInputLength){ |
| 28 | return 1; |
| 29 | } |
| 30 | |
| 31 | std::string input(reinterpret_cast<const char*>(data), size); |
| 32 | butil::IOBuf buf; |
| 33 | buf.append(input); |
| 34 | |
| 35 | brpc::Socket* sock = get_fuzz_socket(); |
| 36 | brpc::policy::ParseRpcMessage(&buf, sock, false, NULL); |
| 37 | return 0; |
| 38 | } |
nothing calls this directly
no test coverage detected