| 40 | } |
| 41 | |
| 42 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) |
| 43 | { |
| 44 | if (size > (8u << 10)) // execution amplifies; keep inputs small |
| 45 | return 0; |
| 46 | std::string src(reinterpret_cast<const char*>(data), size); |
| 47 | GameVarSpace local(GGameState.GetContext()); |
| 48 | GGameState.BeginContext(&local); |
| 49 | try |
| 50 | { |
| 51 | GGameState.EvaluateMultiple(src.c_str(), true); |
| 52 | } |
| 53 | catch (...) |
| 54 | { |
| 55 | } |
| 56 | GGameState.EndContext(); // always pop, even on a thrown error, so the stack stays sane |
| 57 | return 0; |
| 58 | } |
nothing calls this directly
no test coverage detected