mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 11:26:18 -04:00
60db0e5ef9
This updates `fmt` to the latest version and moves to just being a copy of their repo to make updating easier (no editing their cmake / figuring out which files to minimally include). The motivation for this is now that we switched to C++ 20, there were a ton of deprecated function usages that is going away in future compiler versions. This gets rid of all those warnings.
23 lines
592 B
C++
Vendored
Generated
23 lines
592 B
C++
Vendored
Generated
#include <cassert>
|
|
#include <fstream>
|
|
#include <vector>
|
|
|
|
#include "fuzzer-common.h"
|
|
|
|
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size);
|
|
|
|
int main(int argc, char** argv) {
|
|
for (int i = 1; i < argc; ++i) {
|
|
std::ifstream in(argv[i]);
|
|
assert(in);
|
|
in.seekg(0, std::ios_base::end);
|
|
const auto size = in.tellg();
|
|
assert(size >= 0);
|
|
in.seekg(0, std::ios_base::beg);
|
|
std::vector<char> buf(static_cast<size_t>(size));
|
|
in.read(buf.data(), size);
|
|
assert(in.gcount() == size);
|
|
LLVMFuzzerTestOneInput(as_bytes(buf.data()), buf.size());
|
|
}
|
|
}
|