MCPcopy Create free account
hub / github.com/beefytech/Beef / LLVMFuzzerTestOneInput

Function LLVMFuzzerTestOneInput

BeefFuzz/BeefFuzz.cpp:62–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60static bool init = false;
61
62extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
63{
64 if (!init)
65 {
66 init = true;
67 FuzzInit();
68 }
69
70 trimwhitespace(Data, Size);
71 if (Size == 0)
72 return 0;
73
74 gApp->PrepareCompiler();
75
76 bool ready = gApp->QueueFile((char*)Data, Size);
77
78 //if (ready)
79 // ready = gApp->QueuePath("./corlib/src");
80
81 //if (ready)
82 // gApp->Compile();
83
84 gApp->ReleaseCompiler();
85
86 return 0;
87}

Callers

nothing calls this directly

Calls 5

FuzzInitFunction · 0.85
trimwhitespaceFunction · 0.85
PrepareCompilerMethod · 0.80
ReleaseCompilerMethod · 0.80
QueueFileMethod · 0.45

Tested by

no test coverage detected