2019-06-21 03:35:23 +00:00
|
|
|
#include <qpdf/QUtil.hh>
|
2019-06-13 13:28:38 +00:00
|
|
|
#include <iostream>
|
2019-06-21 03:35:23 +00:00
|
|
|
#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++) {
|
2022-04-09 18:49:10 +00:00
|
|
|
std::shared_ptr<char> file_buf;
|
2019-06-21 03:35:23 +00:00
|
|
|
size_t size = 0;
|
2019-06-22 14:12:10 +00:00
|
|
|
QUtil::read_file_into_memory(argv[i], file_buf, size);
|
2022-02-04 15:10:19 +00:00
|
|
|
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;
|
|
|
|
}
|