| 28 | #define kMaxInputLength 1024 |
| 29 | |
| 30 | extern "C" int |
| 31 | LLVMFuzzerTestOneInput(const uint8_t *input_data, size_t size_data) |
| 32 | { |
| 33 | if (size_data < kMinInputLength || size_data > kMaxInputLength) { |
| 34 | return 1; |
| 35 | } |
| 36 | |
| 37 | std::string input(reinterpret_cast<const char *>(input_data), size_data); |
| 38 | |
| 39 | EsiParser parser{1024 * 1024}; |
| 40 | |
| 41 | EsiLib::DocNodeList node_list; |
| 42 | bool ret = parser.completeParse(node_list, input); |
| 43 | |
| 44 | if (ret == true) { |
| 45 | EsiLib::DocNodeList node_list2; |
| 46 | std::string packed = node_list.pack(); |
| 47 | node_list2.unpack(packed); |
| 48 | node_list2.clear(); |
| 49 | } |
| 50 | node_list.clear(); |
| 51 | |
| 52 | return 0; |
| 53 | } |
nothing calls this directly
no test coverage detected