aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDF.cc
AgeCommit message (Collapse)Author
2020-10-22Obscure bug fix copying foreign streams in special cases (fixes #449)Jay Berkenbilt
Specifically, if a stream had its stream data replaced and had indirect /Filter or /DecodeParms, it would result in non-silent loss of data and/or internal error.
2020-10-21Protect numeric conversion against user's locale (fixes #459)Jay Berkenbilt
2020-10-18Stop using InputSource::unreadChJay Berkenbilt
2020-10-17Check integer overflow in resolveObjectsInStreamDean Scarff
Fixes a crash found by fuzzing.
2020-04-09Prepare 10.0.1 releaserelease-qpdf-10.0.1Jay Berkenbilt
2020-04-06Prepare 10.0.0 releaseJay Berkenbilt
2020-04-06Allow propagation of errors and retry through StreamDataProviderJay Berkenbilt
StreamDataProvider::provideStreamData now has a rich enough API for it to effectively proxy to pipeStreamData.
2020-04-04Use deterministic assignments for unique_idDean Scarff
Fixes qpdf/qpdf#419
2020-01-27Prepare 9.1.1 releaserelease-qpdf-9.1.1Jay Berkenbilt
2019-11-17Prepare 9.1.0 releaserelease-qpdf-9.1.0Jay Berkenbilt
2019-11-10Prepare 9.1.rc1 releaseJay Berkenbilt
2019-11-04Fix two additional fuzz test casesJay Berkenbilt
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-13Prepare 9.0.2 releaserelease-qpdf-9.0.2Jay Berkenbilt
2019-09-20Prepare 9.0.1 releaseJay Berkenbilt
2019-09-18Fix fuzz issue 16953 (overflow checking in xref stream index)Jay 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-28Fix fuzz issues 15316 and 15390Jay 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-24Track separately whether password was user/owner (fixes #159)Jay Berkenbilt
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-20Handle invalid name tokens symmetrically for PDF < 1.2 (fixes #332)Jay Berkenbilt
2019-08-18Improve efficiency of fixDanglingReferencesJay Berkenbilt
2019-06-22Remove QPDF::copyForeignObject with unused parameterJay 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-15Eliminate one potential integer overflowJay Berkenbilt
There are more to handle, but this resolves an issue already caught by oss-fuzz.
2019-05-18Prepare 8.4.2 releaseJay Berkenbilt
2019-04-28Prepare 8.4.1 releaserelease-qpdf-8.4.1Jay Berkenbilt
2019-03-12Undefined functions because of missing std:: or header. (#295)Thorsten Schöning
* [bcc32 Error] QPDF.cc(375): E2268 Call to undefined function 'atof' Full parser context QPDF.cc(358): parsing: void QPDF::parse(const char *) * [bcc32 Error] QPDFTokenizer.cc(183): E2268 Call to undefined function 'strtol' Full parser context QPDFTokenizer.cc(163): parsing: void QPDFTokenizer::resolveLiteral() * [bcc32 Error] pdf-split-pages.cc(52): E2268 Call to undefined function 'exit' Full parser context pdf-split-pages.cc(50): parsing: void usage() * PR #295: Including "cstdlib" should be replaced with "stdlib.h" to be more consistent. At the same time I changed the order of the surrounding includes to reflect alphabetical order, because at some files this already have been the case.
2019-02-02Prepare 8.4.0 releaseJay Berkenbilt
2019-01-29Clarify documentation for copyForeignObject regarding pagesJay Berkenbilt
Make explicit that copyForeignObject can be used on page objects and will copy them properly but not update the pages tree.
2019-01-12Allow adding the same page more than once in --pages (fixes #272)Jay Berkenbilt
2019-01-11Add QPDF::setImmediateCopyFromJay Berkenbilt
2019-01-07Update version to 8.3.0Jay Berkenbilt
2019-01-07Exercise out of scope original pdf for copyForeignObjectJay Berkenbilt
2019-01-07Mostly don't require original QPDF for copyForeignObject (fixes #219)Jay Berkenbilt
The original QPDF is only required now when the source QPDFObjectHandle is a stream that gets its stream data from a QPDFObjectHandle::StreamDataProvider.
2019-01-07Make a static version of QPDF::pipeStreamDataJay Berkenbilt
This is in preparation of being able to pipe a stream's data without keeping a copy of its containing qpdf object.
2019-01-07Create an application-scope unique ID for each QPDF objectJay Berkenbilt
Use this instead of QPDF* as a map key for object_copiers.
2019-01-06Move encryption parameters into a classJay Berkenbilt
2019-01-04Don't call assert while checking linearization data (fixes #209, #231)Jay Berkenbilt
Instead of calling assert for problems found during checking linearization data, throw an exception which is later caught and issued as an error. Ideally we would handle errors more robustly, but this is still a significant improvement.
2019-01-04Fix dangling references (fixes #240)Jay Berkenbilt
On certain operations, such as iterating through all objects and adding new indirect objects, walk through the entire object structure and explicitly resolve any indirect references to non-existent objects. That prevents new objects from springing into existence and causing the previously dangling references to point to them.
2019-01-03Fix seg fault on empty xref stream (fixes #263)Jay Berkenbilt
Thanks to @p-cher for supplying a patch.
2018-08-18Prepare 8.2.1 releaserelease-qpdf-8.2.1Jay Berkenbilt
2018-08-16Prepare 8.2.0 releaserelease-qpdf-8.2.0Jay Berkenbilt
2018-06-23Prepare 8.1.0 releaserelease-qpdf-8.1.0Jay Berkenbilt