-
Optimistically read subsection headers without reading individual object entries, assuming that they are 20 bytes long as per the PDF spec. If problems are encountered, fall back to calling bad_subsections.
-
Temporarily disable 3 specific-bugs tests. Remove 'xref size mismatch' test.
-
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.
-
Calculate all subsections before reading subsection entries. Duplicates some warnings for the time being.
-
Also, when recovering trailer from xref streams, pick the last valid trailer encountered rather than the first.
-
Change first xref stream dictionary to point to an invalid root in order to detect failure to recover the last valid trailer.
-
Ensure the the recovered stream end is not part of a different object. Test file is bad24.pdf with stream 4 'endstream' corrupted.
-
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.
-
Handle case where named destination is a dictionary with /D entry. Test case is hand-edited outlines-with-old-root-dests.pdf with modified object 107.
-
If reconstruct_xref generates more than 1000 warnings give up because the file is so severely damaged that there is very little point continuing.
-
Check that xref table is not empty after recovery. Empty xref tables disable other sanity checks.
-
Previous test case was lost in #1221. Test file was created from object-stream.pdf by adding a reference to itself into object stream 1 0.
-
Ensure objects with impossibly large ids are ignored.
-
Also add new fuzz test case.
-
A file that has Widget annotations that can't be mapped back to form fields would crash qpdf json.
-
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.
-
Also, test writing JSON v1 files and files with deeply nested containers.
-
The code accepted values other than /Yes but still used /Yes as the checked value instead of obeying the normal appearance dictionary.
-
A parse error in stream data in which stream data contained a nested object would cause a crash because qpdf was not correctly updating its internal state. Rework the QPDF json reactor to not be sensitive to parse errors in this way.
-
...since they have to be handled before other options. It was working because, in both cases, `file` was alphabetically before the other keys, but this implementation gives a stronger guarantee.
-
Accept --file and --range as named parameters in additional to allowing positional arguments. This is in preparation for adding additional flags.