| 22 | #define kMaxInputLength 1024 |
| 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 | butil::Arena arena; |
| 36 | brpc::RedisCommandParser parser; |
| 37 | std::vector<butil::StringPiece> command_out; |
| 38 | parser.Consume(buf, &command_out, &arena); |
| 39 | } |
| 40 | { |
| 41 | butil::Arena arena; |
| 42 | brpc::RedisReply r2(&arena); |
| 43 | r2.ConsumePartialIOBuf(buf); |
| 44 | } |
| 45 | |
| 46 | return 0; |
| 47 | } |
| 48 |
nothing calls this directly
no test coverage detected