aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf
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-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.
2020-04-09Prepare 10.0.1 releaserelease-qpdf-10.0.1Jay Berkenbilt
2020-04-09Fix unnecessary copies in auto iter (fixes #426)Jay Berkenbilt
Also switch to colon-style iteration in some cases. Thanks to Dean Scarff for drawing this to my attention after detecting some unnecessary copies with https://clang.llvm.org/extra/clang-tidy/checks/performance-for-range-copy.html
2020-04-09Bug fix: getStreamData should on unfilterable stream (fixes #425)Jay Berkenbilt
2020-04-06Prepare 10.0.0 releaseJay Berkenbilt
2020-04-06Don't include <cwchar> if not building with wcharJay Berkenbilt
2020-04-06Delegate random number generation to crypto provider (fixes #418)Jay Berkenbilt
2020-04-06Make random data provider code thread-safeJay Berkenbilt
This uses C++-11 thread-safe static initializers now.
2020-04-06Remove QUtil::srandomJay Berkenbilt
2020-04-06Add OpenSSL/BoringSSL crypto providerDean Scarff
Fixes qpdf/qpdf#417
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-05JSON: implement pattern keys in schemaJay Berkenbilt
2020-04-04Use deterministic assignments for unique_idDean Scarff
Fixes qpdf/qpdf#419
2020-04-04Allow qpdf to be built on systems without wchar_t (fixes #406)Jay Berkenbilt
2020-04-04Avoid potential segfault in warning methodsJay Berkenbilt
2020-04-04placeFormXObject: allow control of shrink/expand (fixes #409)Jay Berkenbilt
2020-04-03C API: accept any non-zero value as TRUEJay Berkenbilt
2020-04-03Remove redundant methods in QUtilJay Berkenbilt
This was being saved until we had to break ABI.
2020-04-03QPDFPageObjectHelper::placeFormXObject: use std::string const& (fixes #374)Jay Berkenbilt
2020-04-03Performance: remove Members indirection for PipelineJay Berkenbilt
2020-04-03Use an unordered map for SparseOHArray for efficiencyJay Berkenbilt
This was added in C++11.
2020-04-03Use auto for iterating over sparse arrayJay Berkenbilt
2020-04-03Internally use unsafeShallowCopy where we canJay Berkenbilt
2020-04-03Add QPDFObjectHandle::unsafeShallowCopyJay Berkenbilt
2020-04-03Performance: remove indirection through Members for QPDFObjectJay Berkenbilt
2020-04-03Performance: remove Members indirection for QPDFObjectHandleJay Berkenbilt
2020-03-31Look in form XObjects when removing unreferenced resources (fixes #373)Jay Berkenbilt
If a page contains a form XObject, also filter the form XObject and remove its unreferenced resources.
2020-03-31Refactor QPDFPageObjectHelper::removeUnreferencedResources()Jay Berkenbilt
Refactor removeUnreferencedResources to prepare for filtering form XObjects.
2020-02-29Include header for wcslen (fixes #405)Jay Berkenbilt
2020-02-22Handle root /Pages pointing to other than page tree root (fixes #398)Jay Berkenbilt
2020-01-27Prepare 9.1.1 releaserelease-qpdf-9.1.1Jay Berkenbilt
2020-01-26In qdf mode, don't write extra XRef streams (fixes #386)Jay Berkenbilt
fix-qdf assumes there is exactly one XRef stream and that it is at the end of the file.
2020-01-26Bug fix: handle ColorSpace lookup for inline images (fixes #392)Jay Berkenbilt
If the value of /CS in the inline image dictionary was is key in the page's /Resource -> /ColorSpace dictionary, properly resolve it by referencing the proper colorspace, and not just the name, in the external image dictionary.
2020-01-15Fix for Windows unable to acquire crypt context with new keyset (fixes #387)Cloudmersive
Fix is based on guidance https://support.microsoft.com/en-us/help/238187/cryptacquirecontext-use-and-troubleshooting and is the proper fix for #285/#286
2020-01-14Pull wmain -> main code from qpdf.cc into QUtil.ccJay Berkenbilt
2020-01-14Add error detection for read_lines_from_file(FILE*)Jay Berkenbilt
2020-01-13QUtil::read_lines_from_file: optional EOL preservationJay Berkenbilt
2020-01-13Refactor QUtil::read_lines_from_fileJay Berkenbilt
This commit adds the preserve_eol flags but doesn't implement EOL preservation yet.