From 1bde5c68a302c99c627f86d8c95226a8a7623ac3 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sat, 22 Jun 2019 10:12:10 -0400 Subject: Add QUtil::read_file_into_memory This code was essentially duplicated between test_driver and standalone_fuzz_target_runner. --- include/qpdf/QUtil.hh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/qpdf/QUtil.hh b/include/qpdf/QUtil.hh index 9f76f738..a0442f69 100644 --- a/include/qpdf/QUtil.hh +++ b/include/qpdf/QUtil.hh @@ -24,6 +24,7 @@ #include #include +#include #include #include #include @@ -304,6 +305,9 @@ namespace QUtil std::list read_lines_from_file(char const* filename); QPDF_DLL std::list read_lines_from_file(std::istream&); + QPDF_DLL + void read_file_into_memory( + char const* filename, PointerHolder& file_buf, size_t& size); // This used to be called strcasecmp, but that is a macro on some // platforms, so we have to give it a name that is not likely to -- cgit v1.2.3-54-g00ecf