#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include <stddef.h>
#include <stdint.h>
#include <fstream>
#include <iostream>
#include <iterator>
#include <vector>
extern "C" {
int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size);
__attribute__((weak)) int LLVMFuzzerInitialize(int *argc, char ***argv);
size_t LLVMFuzzerMutate(uint8_t *Data, size_t Size, size_t MaxSize);
}
std::vector<uint8_t> readFile(std::string path) { … }
size_t LLVMFuzzerMutate(uint8_t *Data, size_t Size, size_t MaxSize) { … }
int main(int argc, char **argv) { … }