mirror of
https://github.com/qpdf/qpdf.git
synced 2024-10-31 19:02:30 +00:00
ba0ef7a124
Increase to POINTERHOLDER_TRANSITION=3 patrepl s/PointerHolder/std::shared_ptr/g **/*.cc **/*.hh patrepl s/make_pointer_holder/std::make_shared/g **/*.cc patrepl s/make_array_pointer_holder/QUtil::make_shared_array/g **/*.cc patrepl s,qpdf/std::shared_ptr,qpdf/PointerHolder, **/*.cc **/*.hh git restore include/qpdf/PointerHolder.hh git restore libtests/pointer_holder.cc cleanpatch ./format-code
20 lines
526 B
C++
20 lines
526 B
C++
#include <qpdf/QUtil.hh>
|
|
#include <iostream>
|
|
#include <string>
|
|
|
|
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);
|
|
std::cout << argv[i] << " successful" << std::endl;
|
|
}
|
|
return 0;
|
|
}
|