aboutsummaryrefslogtreecommitdiffstats
path: root/include
AgeCommit message (Collapse)Author
2017-07-28Add precheck streams capabilityJay Berkenbilt
When requested, QPDFWriter will do more aggress prechecking of streams to make sure it can actually succeed in decoding them before attempting to do so. This will allow preservation of raw data even when the raw data is corrupted relative to the specified filters.
2017-07-28Convert stream filtering errors to warningsJay Berkenbilt
2017-07-28Convert object parsing errors to warningsJay Berkenbilt
QPDFObjectHandle::parseInternal now issues warnings instead of throwing exceptions for all error conditions that it finds (except internal logic errors) and has stronger recovery for things like invalid tokens and malformed dictionaries. This should improve qpdf's ability to recover from a wide range of broken files that currently cause it to fail.
2017-07-27Move lexer helper functions to QUtilJay Berkenbilt
2017-07-26Detect recursion loops resolving objects (fixes #51)Jay Berkenbilt
During parsing of an object, sometimes parts of the object have to be resolved. An example is stream lengths. If such an object directly or indirectly points to the object being parsed, it can cause an infinite loop. Guard against all cases of re-entrant resolution of objects.
2017-07-26Avoid xref reconstruction infinite loop (fixes #100)Jay Berkenbilt
This is CVE-2017-9209.
2017-07-26Fix typo in commentJay Berkenbilt
2016-01-24Include QPDFExc.hh for use in std::listThorsten Schöning
2016-01-24Include QPDFObjectHandle for use in std::listThorsten Schöning
QPDFObjectHandle was used as forward declaration, but C++-Builder 10 Seattle can't use it in std::list in such cases because the type is undefined.
2015-11-10Remove some ABI compatibility private methodsJay Berkenbilt
Since we have to bump soname, remove some private methods that were just there for binary compatibility
2015-10-31Fix spelling errorsJay Berkenbilt
2015-10-31Implement deterministic IDJay Berkenbilt
For non-encrypted files, determinstic ID generation uses file contents instead of timestamp and file name. At a small runtime cost, this enables generation of the same /ID if the same inputs are converted in the same way multiple times.
2015-05-24Copyright 2015Jay Berkenbilt
2015-05-24include time.h in QUtil.hhJay Berkenbilt
QUtil.hh needs time.h to get time_t on some platforms. Thanks Peter Korsgaard <peter@korsgaard.com>
2015-02-22Detect loops in /Pages structureJay Berkenbilt
Pushing inherited objects to pages and getting all pages were both prone to stack overflow infinite loops if there were loops in the Pages dictionary. There is a general weakness in the code in that any part of the code that traverses the Pages structure would be prone to this and would have to implement its own loop detection. A more robust fix may provide some general method for handling the Pages structure, but it's probably not worth doing. Note: addition of *Internal2 private functions was done rather than changing signatures of existing methods to avoid breaking compatibility.
2014-01-14Update Copyright to 2014Jay Berkenbilt
2013-12-16Increase random data provider supportJay Berkenbilt
Add a method to get the current random data provider, and document and test the method for resetting it.
2013-12-14Refactor random data generationJay Berkenbilt
Add new RandomDataProvider object and implement existing random number generation in terms of that. This enables end users to supply their own random data providers.
2013-10-29Add missing #include of <string>Jay Berkenbilt
2013-10-18Security: use a secure random number generatorJay Berkenbilt
If not available, give an error. The user may also configure qpdf to use an insecure random number generator.
2013-07-10Change API/ABI and withdraw 4.2.0Jay Berkenbilt
4.2.0 was binary incompatible in spite of there being no deletions or changes to any public methods. As such, we have to bump the ABI and are fixing some API breakage while we're at it. Previous 4.3.0 target is now 5.1.0.
2013-06-14Bug fix: handle generation > 0 when generating object streamsJay Berkenbilt
Rework QPDFWriter to always track old object IDs and QPDFObjGen instead of int, thus not discarding the generation number. Switch to QPDF::getCompressibleObjGen() to properly handle the case of an old object eligible for compression that has a generation of other than zero.
2013-06-14Use QPDFObjectHandle::getObjGen() where appropriateJay Berkenbilt
In internal code and examples, replace calls to getObjectID() and getGeneration() with calls to getObjGen() where possible.
2013-06-14Add QPDFObjectHandle::getObjGen()Jay Berkenbilt
This is safer than getObjectID() and getGeneration() for many uses.
2013-06-14Promote QPDF::ObjGen to top-level object QPDFObjGenJay Berkenbilt
2013-03-11Export terminateParsing in the DLLJay Berkenbilt
Windows fix: QPDFObject::ParserCallbacks::terminateParsing() was not declared with QPDF_DLL.
2013-03-11Clarify documentation on encrypted filesJay Berkenbilt
Explicitly state how QPDF handles empty passwords when writing files. Apparently some libraries treat the empty string as the owner password as an instruction to generate a random password.
2013-03-05Fix getTypeCode and getTypeName work for indirect objectsJay Berkenbilt
Remove const qualifier from getTypeCode and get getTypeName methods of QPDFObjectHandle, make them work properly for indirect objects, and exercise them much better in the test suite.
2013-03-05Add method to terminate content stream parsingJay Berkenbilt
2013-03-05Call QUtil::safe_fopen in place of fopenJay Berkenbilt
fopen was previuosly called wrapped by QUtil::fopen_wrapper, but QUtil::safe_fopen does this itself, which is less cumbersome.
2013-03-05Remove all calls to sprintfJay Berkenbilt
2013-03-04Remove all old-style casts from C++ codeJay Berkenbilt
2013-03-04Replace many calls to sprintf with QUtil::hex_encodeJay Berkenbilt
Add QUtil::hex_encode to encode binary data has a hexadecimal string, and use it in place of sprintf where possible.
2013-01-23Cosmetic changes to be closer to Adobe terminologyJay Berkenbilt
Change object type Keyword to Operator, and place the order of the object types in object_type_e in the same order as they are mentioned in the PDF specification. Note that this change only breaks backward compatibility with code that has not yet been released.
2013-01-22Add getTypeCode() and getTypeName()Jay Berkenbilt
Add virtual methods to QPDFObject, wrappers to QPDFObjectHandle, and implementations to all the QPDF_Object types.
2013-01-20Add QPDFObjectHandle::parseContentStream methodJay Berkenbilt
This method allows parsing of the PDF objects in a content stream or array of content streams.
2013-01-20Added new QPDFObjectHandle types Keyword and InlineImageJay Berkenbilt
These object types are to facilitate content stream parsing.
2013-01-04Clarify methods to get user passwordJay Berkenbilt
With newer encryption formats, it is no longer possible to recover the user password using the owner password.
2012-12-31Update "C" API with functions for new featuresJay Berkenbilt
2012-12-31Avoid modifying trailer when writingJay Berkenbilt
When preparing the trailer for writing to the new file, trim a copy of the trailer instead of the original file's trailer.
2012-12-31Update copyright year to 2013Jay Berkenbilt
Also add copyright notice to a few public headers that were missing one.
2012-12-31Refactor Dictionary writing codeJay Berkenbilt
Original code was written before we could shallow copy objects, so all the filtering was done by suppressing the output of certain keys and replacing them with other keys. Now we can simplify the code greatly by modifying shallow copies of dictionaries in place.
2012-12-31Support for encryption with /V=5 and /R=5 and /R=6Jay Berkenbilt
Read and write support is implemented for /V=5 with /R=5 as well as /R=6. /R=5 is the deprecated encryption method used by Acrobat IX. /R=6 is the encryption method used by PDF 2.0 from ISO 32000-2.
2012-12-31Support files with only attachments encryptedJay Berkenbilt
Test cases added in a future commit since they depend on /R=6 support.
2012-12-31Add random number functions to QUtilJay Berkenbilt
2012-12-31Comment about non-const Pipeline dataJay Berkenbilt
2012-12-31Add ExtensionLevel support to version handlingJay Berkenbilt
All version operations are now fully aware of extension levels.
2012-12-31Add V5 parameters to EncryptionDataJay Berkenbilt
2012-12-31change EncryptionDataJay Berkenbilt
2012-12-31Eliminate flattenScalarReferencesJay Berkenbilt