aboutsummaryrefslogtreecommitdiffstats
path: root/include
AgeCommit message (Collapse)Author
2019-10-22Add QPDFWriter::getWrittenXRefTable()Masamichi Hosoda
2019-10-22Add QPDFWriter::getRenumberedObjGen()Masamichi Hosoda
2019-10-22Add QPDF::getXRefTable()Masamichi Hosoda
2019-10-22Fix /Contents value representation in a signature dictionaryMasamichi Hosoda
Table 8.93 "Entries in a signature dictionary" in PDF 1.5 reference describes that the value of Contents entry is a hexadecimal string representation when ByteRange is specified. This commit makes QPDF always uses hexadecimal strings representation instead of literal strings for it.
2019-09-17Don't assume char is signed in int conversion tests (fixes #361)Jay Berkenbilt
2019-08-31Add methods QPDF::anyWarnings and QPDF::closeInputSourceJay Berkenbilt
2019-08-31Add remove_file and rename_file to QUtilJay Berkenbilt
2019-08-31spell checkJay Berkenbilt
2019-08-28Make popping pipeline stack saferJay Berkenbilt
Use destructors to pop the pipeline stack, and ensure that code that pops the stack is actually popping the intended thing.
2019-08-27Fix fuzz issue 15442 (overflow checking in BufferInputSource)Jay Berkenbilt
2019-08-24Track separately whether password was user/owner (fixes #159)Jay Berkenbilt
2019-08-24Add flags to control zlib compression level (fixes #113)Jay Berkenbilt
2019-08-24Add ability to set zlib compression level globallyJay Berkenbilt
2019-08-23Pass offset and length to ParserCallbacks::handleObjectJay Berkenbilt
2019-08-22Test for direct, rather than resolved nulls in parserJay Berkenbilt
Just because we know an indirect reference is null, doesn't mean we shouldn't keep it indirect.
2019-08-22Mention name tokens in TokenFilter commentsJay Berkenbilt
2019-08-22Protect against coding error of re-entrant parsingJay Berkenbilt
2019-08-20Handle invalid name tokens symmetrically for PDF < 1.2 (fixes #332)Jay Berkenbilt
2019-08-18Use SparseOHArray in QPDF_ArrayJay Berkenbilt
2019-08-18SparseOHArrayJay Berkenbilt
2019-07-14Update comment in PointerHolderJay Berkenbilt
2019-07-04Change list to vector for outline helpers (fixes #297)Thorsten Schöning
This change works around STL problems with Embarcadero C++ Builder version 10.2, but std::vector is more common than std::list in qpdf, and this is a relatively new API, so an API change is tolerable. Thanks to Thorsten Schöning <6223655+ams-tschoening@users.noreply.github.com> for the fix.
2019-06-23Treat all linearization errors as warningsJay Berkenbilt
This also reverts the addition of a new checkLinearization that distinguishes errors from warnings. There's no practical distinction between what was considered an error and what was considered a warning.
2019-06-22In shippable code, favor smart pointers (fixes #235)Jay Berkenbilt
Use PointerHolder in several places where manually memory allocation and deallocation were being used. This helps to protect against memory leaks when exceptions are thrown in surprising places.
2019-06-22qpdf: exit 3 for linearization warnings without errors (fixes #50)Jay Berkenbilt
2019-06-22Add QUtil::read_file_into_memoryJay Berkenbilt
This code was essentially duplicated between test_driver and standalone_fuzz_target_runner.
2019-06-22QPDFWriter: clean up overloaded functionsJay Berkenbilt
In a small number of cases, it makes sense to replace an overloaded function with a function that takes a default argument. We can do this now because we've already broken binary compatibility since the last release.
2019-06-22Convert remaining public classes to use Members patternJay Berkenbilt
Have classes contain only a single private member of type PointerHolder<Members>. This makes it safe to change the structure of the Members class without breaking binary compatibility. Many of the classes already follow this pattern quite successfully. This brings in the rest of the class that are part of the public API.
2019-06-22Build with -fvisibility=hidden when supportedJay Berkenbilt
2019-06-22Remove broken QPDFTokenizer::expectInlineImageJay Berkenbilt
2019-06-22Remove QPDF::copyForeignObject with unused parameterJay Berkenbilt
2019-06-22Rename QUtil::strcasecmp to QUtil::str_compare_nocase (fixes #242)Jay Berkenbilt
2019-06-21Fix sign and conversion warnings (major)Jay Berkenbilt
This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with MSVC. This significantly reduces the likelihood of potential crashes from bogus integer values. There are some parts of the code that take int when they should take size_t or an offset. Such places would make qpdf not support files with more than 2^31 of something that usually wouldn't be so large. In the event that such a file shows up and is valid, at least qpdf would raise an error in the right spot so the issue could be legitimately addressed rather than failing in some weird way because of a silent overflow condition.
2019-06-21Pl_Flate: constructor's out_bufsize is now unsigned intJay Berkenbilt
This is the type we need for the underlying zlib implementation.
2019-06-21Change QPDFObjectHandle::pipeStreamData's encode_flags typeJay Berkenbilt
Change from unsigned long to int since we pass enumerated type values to this field.
2019-06-21Add new integer accessors to QPDFObjectHandleJay Berkenbilt
2019-06-21QUtil: add unsigned int/string functionsJay Berkenbilt
2019-06-21New safe type converters in QIntCJay Berkenbilt
2019-06-12Fix typo (#334)Marco Scarpetta
2019-03-11Fix C++ exception handling when -fvisibility=hidden (#302)jbarlow83
Fix C++ exception handling when -fvisibility=hidden Ensure that QPDFExc and QPDFSystemError are marked visible, so that their typeinfo will not be suppressed when -fvisibility=hidden. Details: https://gcc.gnu.org/wiki/Visibility
2019-03-11[bcc32 Error] QPDF.hh(803): E2247 'QPDF::Members::resolving' is not accessibleThorsten Schöning
Full parser context QPDF.cc(2): #include ..\..\..\..\src\include\qpdf\QPDF.hh QPDF.hh(48): class QPDF QPDF.hh(1380): decision to instantiate: QPDF::ResolveRecorder::ResolveRecorder(QPDF *,const QPDFObjGen &) --- Resetting parser context for instantiation... QPDF.hh(799): parsing: QPDF::ResolveRecorder::ResolveRecorder(QPDF *,const QPDFObjGen &)
2019-03-11[bcc32 Error] QPDFObjectHandle.hh(911): E2247 ↵Thorsten Schöning
'QPDFObjectHandle::Members::obj' is not accessible Full parser context Pl_QPDFTokenizer.cc(1): #include ..\..\..\..\src\include\qpdf\Pl_QPDFTokenizer.hh Pl_QPDFTokenizer.hh(29): #include ..\..\..\..\src\include\qpdf/QPDFObjectHandle.hh QPDFObjectHandle.hh(51): class QPDFObjectHandle QPDFObjectHandle.hh(1052): decision to instantiate: PointerHolder<QPDFObject> QPDFObjectHandle::ObjAccessor::getObject(QPDFObjectHandle &) --- Resetting parser context for instantiation... QPDFObjectHandle.hh(909): parsing: PointerHolder<QPDFObject> QPDFObjectHandle::ObjAccessor::getObject(QPDFObjectHandle &)
2019-03-11[bcc32 Error] QPDF.hh(223): E2303 Type name expectedThorsten Schöning
Full parser context QPDF.cc(2): #include ..\..\..\..\src\include\qpdf\QPDF.hh QPDF.hh(47): class QPDF
2019-03-11[bcc32 Error] QPDF.hh(203): E2316 'vector' is not a member of 'std'Thorsten Schöning
Full parser context QPDF.cc(2): #include ..\..\..\..\src\include\qpdf\QPDF.hh QPDF.hh(46): class QPDF
2019-02-01Spell checkJay Berkenbilt
2019-02-01Make inline image token exactly contain the image dataJay Berkenbilt
Do not include the trailing EI, and handle cases where EI is not preceded by a delimiter. Such cases have been seen in the wild.
2019-01-31Externalize inline images (fixes #278)Jay Berkenbilt
2019-01-31Exclude space after ID in image dataJay Berkenbilt
2019-01-31Improve locating inline image's EIJay Berkenbilt
We've actually seen a PDF file in the wild that contained EI surrounded by delimiters inside the image data, which confused qpdf's naive code. This significantly improves EI detection.
2019-01-31Refactor QPDFTokenizer's inline image handlingJay Berkenbilt
Add a version of expectInlineImage that takes an input source and searches for EI. This is in preparation for improving the way EI is found. This commit just refactors the code without changing the functionality and adds tests to make sure the old and new code behave identically.