| 21 | #define kMaxInputLength 4096 |
| 22 | |
| 23 | extern "C" int |
| 24 | LLVMFuzzerTestOneInput(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 | } |
nothing calls this directly
no test coverage detected