-
Refactor xref table reconstruction (Fixes #1362)
-
Split reconstruction into three passes - scanning of input for objects and trailer, insertion of objects into the xref table, and loading the trailer. This allows insertion to take place in the usual reverse order and removes the need for a separate insertReconstructedXrefEntry method. It also allows trailer to be tried from most recent to oldest. Ignore any found trailers without /Root entry.
-
Except for virtual functions to avoid the need for users to update code.
-
This improves indentation of long strings. This commit also fixes some trailing whitespace in ChangeLog.
-
Fixes oss-fuzz case 394129398. Issue arose from chaining multiple runlength filters and inflating a compressed stream of ~100 bytes to several gigabytes. There is no obvious fix without imposing an arbitrary implementation limit and therefore potentially excluding valid PDF files.
-
runtime error
-
Also, fix disabling of preserve_encryption to be ignore stream_decode_level, but disable preserve_encryption if compress_streams is false. Fixes #1286
-
without filtering
-
This reverts commit ff2a78f579ebdd06b417e34260a17dba06e71137, reversing changes made to 8f54319f7a6514110f4b05cbbf1cb1c9fc8cb6a0.
-
Split reconstruction into two passes - scanning of input for objects and insertion of objects into the xref table. This allows insertion to take place in the usual reverse order and removes the need for a separate insert_reconstructed method.
-
Create unresolved objects only for objects in the xref table (except during parsing of the xref table). Do not add indirect nulls into the the object cache as the result of a cache miss during a call to getObject except during parsing or creation/updating from JSON. To support this behaviour, add new private methods getObjectForParser and getObjectForJSON. As a result of this change, dangling references are treated as direct nulls rather than indirect nulls.
-
Also add new fuzz test case.
-
Code failed to allow for QPDF::getCompressibleObjSet deleting objects from the object cache in case of multiple entries for the same object id. Add fuzz test case 68668.
-
Create set without creation of an intermediate vector.