| 25 | static constexpr size_t kMaxInputSize = 4096; |
| 26 | |
| 27 | extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) |
| 28 | { |
| 29 | if (size == 0 || size > kMaxInputSize) { |
| 30 | return 0; |
| 31 | } |
| 32 | |
| 33 | // Create null-terminated string |
| 34 | std::string input(reinterpret_cast<char const*>(data), size); |
| 35 | |
| 36 | cmExprParserHelper helper; |
| 37 | |
| 38 | // Parse with different verbosity levels |
| 39 | int result = helper.ParseString(input.c_str(), 0); |
| 40 | (void)result; |
| 41 | |
| 42 | // Always check result and error accessors |
| 43 | (void)helper.GetResult(); |
| 44 | (void)helper.GetError(); |
| 45 | (void)helper.GetWarning(); |
| 46 | |
| 47 | return 0; |
| 48 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…