-
These are the comments I would have liked to have been able to read while fixing #449 and #478.
-
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.
-
Turns out unreadCh is much more efficient than seek(-1, SEEK_CUR). Update comments and code to reflect this.
-
* Return rather than exiting from realmain in qpdf.cc * Remove extraneous blank line * Don't assign temporary to const reference
-
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.
-
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.
-
Fixes a crash found by fuzzing.
-
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.
-
Fixes qpdf/qpdf#450
-
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().
-
Use autoconf rather than ifdefs to determine what format string to use for long long.
-
When possible, use `for (auto&` or `for (auto const&` when iterating using C++-11 style iterators.
-
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
-
This uses C++-11 thread-safe static initializers now.
-
Fixes qpdf/qpdf#417
-
StreamDataProvider::provideStreamData now has a rich enough API for it to effectively proxy to pipeStreamData.
-
Fixes qpdf/qpdf#419