MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / LLVMFuzzerTestOneInput

Function LLVMFuzzerTestOneInput

apps/fuzzers/Fuzzer/fuzz_lip.cpp:41–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41extern "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}

Callers

nothing calls this directly

Calls 2

RStringClass · 0.50
AttachWaveMethod · 0.45

Tested by

no test coverage detected