| 30 | } |
| 31 | |
| 32 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) |
| 33 | { |
| 34 | // Force a valid "\0raP" magic + version 4 so mutations reach the entry tree |
| 35 | // instead of failing the magic / EBadVersion gate. |
| 36 | static const uint8_t HDR[] = {0x00, 0x72, 0x61, 0x50, 0x04, 0x00, 0x00, 0x00}; |
| 37 | std::vector<uint8_t> buf = fuzz::ForceHeader(HDR, sizeof(HDR), data, size); |
| 38 | try |
| 39 | { |
| 40 | ParamFile pf; |
| 41 | QIStream in(reinterpret_cast<char*>(buf.data()), static_cast<int>(buf.size())); |
| 42 | SerializeBinStream f(&in); |
| 43 | pf.SerializeBin(f); |
| 44 | } |
| 45 | catch (...) |
| 46 | { |
| 47 | } |
| 48 | return 0; |
| 49 | } |
nothing calls this directly
no test coverage detected