aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf
AgeCommit message (Collapse)Author
2021-01-04Fix some pipelines to be safe if downstream write fails (fuzz issue 28262)Jay Berkenbilt
2021-01-03Fix outdated commentJay Berkenbilt
2021-01-02Make more QPDFPageObjectHelper methods work with form XObjectJay Berkenbilt
2021-01-02Externalize inline images now includes form XObjectsJay Berkenbilt
2021-01-02Bug fix: avoid extraneous pipeline finish calls with multiple contentsJay Berkenbilt
Avoid calling finish() multiple times on the pipeline passed to pipeContentStreams. This commit also fixes a bug in which qpdf was not exiting with the proper exit status if warnings found while splitting pages; this was exposed by a test case that changed.
2021-01-02Add several methods for working with form XObjects (fixes #436)Jay Berkenbilt
Make some more methods in QPDFPageObjectHelper work with form XObjects, provide forEach methods to walk through nested form XObjects, possibly recursively. This should make it easier to work with form XObjects from user code.
2021-01-02QPDFPageObjectHelper: filterPageContents -> filterContents + form XObjectJay Berkenbilt
2021-01-02QPDFPageObjectHelper: getPageImages -> getImagesJay Berkenbilt
2021-01-02QPDFPageObjectHelper::getPageImages: support form XObjectsJay Berkenbilt
2021-01-01Add QPDFObjectHandle::isFormXObjectJay Berkenbilt
2020-12-30Add QPDFPageObjectHelper::flattenRotation and --flatten-rotationJay Berkenbilt
2020-12-28Add QPDFObjectHandle::setFilterOnWriteJay Berkenbilt
2020-12-28Add ostream << for QPDFObjGenJay Berkenbilt
2020-12-28Let optimize filter stream parameters instead of making them directJay Berkenbilt
Also removes preclusion of stream references in stream parameters of filterable streams and reduces write times by about 8% by eliminating an extra traversal of the objects.
2020-12-28Restructure optimize to allow skipping parameters of filtered streamsJay Berkenbilt
2020-12-28Refactor: separate code that determines whether to filter a streamJay Berkenbilt
2020-12-28Implement user-provided stream filtersJay Berkenbilt
Refactor QPDF_Stream to use stream filter classes to handle supported stream filters as well.
2020-12-26Add QPDFObjectHandle::makeDirect(bool allow_streams)Jay Berkenbilt
2020-12-20Provide qpdf write progress reporting from C API (fixes #487)Jay Berkenbilt
2020-11-29Add QPDFObjectHandle manipulation to C APIJay Berkenbilt
2020-11-21Prepare 10.0.4 releaserelease-qpdf-10.0.4Jay Berkenbilt
2020-11-11Treat direct page as runtime rather than logic error (fuzz issue 27393)Jay Berkenbilt
2020-11-04Ignore unused field in xref entry, avoiding range error (fixes #482)Jay Berkenbilt
2020-10-31Prepare 10.0.3 releaserelease-qpdf-10.0.3Jay Berkenbilt
2020-10-31Fix stack overflow on direct root (fuzz issue 26761)Jay Berkenbilt
2020-10-31Add comments explaining the foreign object copying codeJay Berkenbilt
These are the comments I would have liked to have been able to read while fixing #449 and #478.
2020-10-31Fix foreign stream copying bug (fixes #478)Jay Berkenbilt
This reverts an incorrect fix to #449 and codes it properly. The real problem was that we were looking at the local dictionaries rather than the foreign dictionaries when saving the foreign stream data. In the case of direct objects, these happened to be the same, but in the case of indirect objects, the object references could be pointing anywhere since object numbers don't match up between the old and new files.
2020-10-27Prepare 10.0.2 releaserelease-qpdf-10.0.2Jay Berkenbilt
2020-10-27Improve efficiency of number to string conversionJay Berkenbilt
2020-10-27Revert removal of unreadCh change for performanceJay Berkenbilt
Turns out unreadCh is much more efficient than seek(-1, SEEK_CUR). Update comments and code to reflect this.
2020-10-23Avoid merging adjacent tokens when concatenating contents (fixes #444)Jay Berkenbilt
2020-10-22Avoid leak by resolving object streams more than once (fuzz issue 23642)Jay Berkenbilt
2020-10-22Minor code cleanupJay Berkenbilt
* Return rather than exiting from realmain in qpdf.cc * Remove extraneous blank line * Don't assign temporary to const reference
2020-10-22Handle jpeg library fuzz false positivesJay Berkenbilt
The jpeg library has some assembly code that is missed by the compiler instrumentation used by memory sanitization. There is a runtime environment variable that is used to work around this issue.
2020-10-22Check for overflow in page labels (fuzz issue 23599)Jay Berkenbilt
2020-10-22Add range_check method to QIntCJay Berkenbilt
2020-10-22Fix loop detection error (fuzz issue 23172)Jay Berkenbilt
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-10-17Properly detect OPENSSL_IS_BORINGSSLDean Scarff
OPENSSL_IS_BORINGSSL is not actually set by configure, so it will be undefined until a BoringSSL header is included. Hence the #ifdef logic in QPDFCrypto_openssl.h would usually never apply. This still worked because evp.h transitively included BoringSSL's cipher.h and digest.h, but the latter are the correct (documented) headers. By re-ordering the includes, we can ensure the macro is defined when we use it. Also: fix case in the header guards.
2020-10-17Include detailed OpenSSL error messagesDean Scarff
Fixes qpdf/qpdf#450
2020-10-17Replace memchr with manual memory searchJames R. Barlow
On large files with predominantly \n line endings, memchr(..'\r'..) seems to waste a considerable amount of time searching for a line ending candidate that we don't need. On the Adobe PDF Reference Manual 1.7, this commit is 8x faster at QPDF::processMemoryFile().
2020-10-17fix WindowsCryptProvider fixes #432oltolm
2020-10-16Fix printf formatting for newer msvcJay Berkenbilt
Use autoconf rather than ifdefs to determine what format string to use for long long.
2020-10-15Remove redundant check found by lgtm.comJay Berkenbilt
2020-04-29Write linearization errors to stderr (fixes #438)Jay Berkenbilt
2020-04-16Fix warnings reported by -Wshadow=local (fixes #431)Jay Berkenbilt
2020-04-10Use more references when iteratingJay Berkenbilt
When possible, use `for (auto&` or `for (auto const&` when iterating using C++-11 style iterators.