aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf
AgeCommit message (Collapse)Author
2019-11-09Require C++-11Jay Berkenbilt
Includes updates to m4/ax_cxx_compile_stdcxx.m4 to make it work with msvc, which supports C++-11 with no flags but doesn't set __cplusplus to a recent value.
2019-11-04Fix two additional fuzz test casesJay Berkenbilt
2019-10-22Parse Contents in signature dictionary without encryptionMasamichi Hosoda
Various PDF digital signing tools do not encrypt /Contents value in signature dictionary. Adobe Acrobat Reader DC can handle a PDF with the /Contents value not encrypted. Write Contents in signature dictionary without encryption Tests ensure that string /Contents are not handled specially when not found in sig dicts.
2019-10-22Add QPDFObject::getParsedOffset()Masamichi Hosoda
2019-10-22Add QPDFWriter::getWrittenXRefTable()Masamichi Hosoda
2019-10-22Add QPDFWriter::getRenumberedObjGen()Masamichi Hosoda
2019-10-22Add QPDF::getXRefTable()Masamichi Hosoda
2019-10-22Exclude signature dictionary from compressible objectsMasamichi Hosoda
It seems better not to compress signature dictionaries. Various PDF digital signing tools, including Adobe Acrobat Reader DC, do not compress signature dictionaries. Table 8.93 "Entries in a signature dictionary" in PDF 1.5 reference describes that /ByteRange in the signature dictionary shall be used to describe a digest that does not include the signature value (/Contents) itself. The byte ranges cannot be determined if the dictionary is compressed.
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-10-13Prepare 9.0.2 releaserelease-qpdf-9.0.2Jay Berkenbilt
2019-09-20Prepare 9.0.1 releaseJay Berkenbilt
2019-09-20Correct reversed Rectangle coordinates (fixes #363)Jay Berkenbilt
2019-09-20Fix typo in commentJay Berkenbilt
2019-09-20Warn for duplicated dictionary keys (fixes #345)Jay Berkenbilt
2019-09-18Fix fuzz issue 16953 (overflow checking in xref stream index)Jay Berkenbilt
2019-09-18Fix integer type warnings for big-endian systemsJay Berkenbilt
2019-09-01Prepare 9.0.0 releaserelease-qpdf-9.0.0Jay Berkenbilt
2019-08-31Add methods QPDF::anyWarnings and QPDF::closeInputSourceJay Berkenbilt
2019-08-31Add remove_file and rename_file to QUtilJay Berkenbilt
2019-08-29Don't encrypt trailer, fixes fuzz issue 15983Jay Berkenbilt
Ordinarily the trailer doesn't contain any strings, so this is usually a non-issue, but if the trailer contains strings, linearizing and encrypting with object streams would include encrypted strings in the trailer, which would blow out the padding because encrypted strings are longer than their cleartext counterparts.
2019-08-28Detect stream in object stream, fixing fuzz 16214Jay Berkenbilt
It's detected in QPDFWriter instead of at parse time because I can't figure out how to construct a test case in a reasonable time. This commit moves the fuzz file into the regular test suite for a QTC coverage case.
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-28Fix fuzz issues 15316 and 15390Jay Berkenbilt
2019-08-27Fix fuzz issue 16172 (overflow checking in OffsetInputSource)Jay Berkenbilt
2019-08-27Fix fuzz issue 15442 (overflow checking in BufferInputSource)Jay Berkenbilt
2019-08-27Seek in two stages to avoid overflowJay Berkenbilt
When seeing to a position based on a value read from the input, we are prone to integer overflow (fuzz issue 15442). Seek in two stages to move the overflow check into the input source code.
2019-08-27Fix fuzz issue 15387 (overflow checking xref size)Jay Berkenbilt
2019-08-26Fix fuzz issue 15475Jay Berkenbilt
2019-08-26Fix fuzz issue 16301Jay Berkenbilt
2019-08-24Track separately whether password was user/owner (fixes #159)Jay Berkenbilt
2019-08-24Split long lineJay 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-22Remove array null flatteningJay Berkenbilt
For some reason, qpdf from the beginning was replacing indirect references to null with literal null in arrays even after removing the old behavior of flattening scalar references. This seems like a bad idea.
2019-08-22Protect against coding error of re-entrant parsingJay Berkenbilt
2019-08-20Accept extraneous space before xref (fixes #341)Jay Berkenbilt
2019-08-20Accept extraneous space after stream keyword (fixes #329)Jay Berkenbilt
2019-08-20Improve invalid name token warning messageJay Berkenbilt
This message used to only appear for PDF >= 1.2. The invalid name is valid for PDF 1.0 and 1.1. However, since QPDFWriter may write a newer version, it's better to detect and warn in all cases. Therefore make the warning more informative.
2019-08-20Handle invalid name tokens symmetrically for PDF < 1.2 (fixes #332)Jay Berkenbilt
2019-08-19Attempt to repair /Type key in pages nodes (fixes #349)Jay Berkenbilt
2019-08-18Improve efficiency of fixDanglingReferencesJay Berkenbilt
2019-08-18Shallow copy arrays without removing sparsenessJay Berkenbilt
2019-08-18Use SparseOHArray in parsingJay Berkenbilt
2019-08-18Use SparseOHArray in QPDF_ArrayJay Berkenbilt
2019-08-18Refactor QPDF_Array in preparation for using SparseOHArrayJay Berkenbilt
2019-08-18SparseOHArrayJay 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-25Convert some cases of logic_error to runtime_errorJay Berkenbilt
There were a few cases that could be caused by invalid input rather than bugs in the code which were throwing logic_error instead of runtime_error.