| 39 | } |
| 40 | |
| 41 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) |
| 42 | { |
| 43 | char lipPath[64]; |
| 44 | char wavePath[64]; |
| 45 | snprintf(lipPath, sizeof(lipPath), "fuzz_lip_tmp_%d.lip", (int)FUZZ_GETPID()); |
| 46 | snprintf(wavePath, sizeof(wavePath), "fuzz_lip_tmp_%d.ogg", (int)FUZZ_GETPID()); |
| 47 | |
| 48 | FILE* fp = fopen(lipPath, "wb"); |
| 49 | if (!fp) |
| 50 | { |
| 51 | return 0; |
| 52 | } |
| 53 | fwrite(data, 1, size, fp); |
| 54 | fclose(fp); |
| 55 | |
| 56 | try |
| 57 | { |
| 58 | Ref<WaveDummy> wave = new WaveDummy(RString(wavePath)); |
| 59 | ManLipInfo lip; |
| 60 | lip.AttachWave(wave, 1.0f); |
| 61 | } |
| 62 | catch (...) |
| 63 | { |
| 64 | } |
| 65 | return 0; |
| 66 | } |
nothing calls this directly
no test coverage detected