2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-22 19:08:59 +00:00
qpdf/fuzz/standalone_fuzz_target_runner.cc

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
513 B
C++
Raw Normal View History

#include <qpdf/QUtil.hh>
2019-06-13 13:28:38 +00:00
#include <iostream>
#include <string>
2019-06-13 13:28:38 +00:00
extern "C" int LLVMFuzzerTestOneInput(unsigned char const* data, size_t size);
int
main(int argc, char** argv)
{
for (int i = 1; i < argc; i++) {
std::shared_ptr<char> file_buf;
size_t size = 0;
QUtil::read_file_into_memory(argv[i], file_buf, size);
LLVMFuzzerTestOneInput(reinterpret_cast<unsigned char*>(file_buf.get()), size);
2019-06-14 16:34:23 +00:00
std::cout << argv[i] << " successful" << std::endl;
2019-06-13 13:28:38 +00:00
}
return 0;
}