-
Moved `expand_filter_name` calls to maintain uniformity and avoid redundant processing in filter handling. This ensures cleaner and more structured code without changing functionality.
-
Moved the filter abbreviation expansion logic from a static map to a new `expand_filter_name` method in `QPDF_Stream::Members`. This simplifies the code, improves maintainability, and consolidates the logic for easier testing and updates.
-
When validating the pages tree after xref recovery do not tree dictionaries as page objects if more than 2 of the following are true: - the dictionary is direct - the /Type entry is missing or is not /Page - the dictionary does not contain a valid /Parent entry - the dictionary does not contain or inherit a valid /MediaBox - the dictionary does not contain or inherit a /Resources dictionary Such dictionaries are very unlikely to be page objects and trying to process them may cause excessive run time and memory usage.
-
Refine xref table reconstruction
-
Fix QPDFFormFieldObjectHelper::getChoices (fixes #1433)
-
During xref table reconstruction ignore uncompressed object entries found in xref streams. The xref table gets populated with entries for the objects actually found in the file. The entries for uncompressed object in xref streams are redundant and potentially incorrect.
-
Return the display value if the choices entry is an array of strings rather than a single string. Test file is need-appearances.pdf modified to contain one array entry.
-
Do not copy duplicate pages during xref recovery.
-
Reject objects containing arrays or dictionaries with more than 5000 elements. We are by definition dealing with damaged files, and such objects are extremely likely to be invalid or malicious.
-
Fix android build issues (fixes #950)
-
Implement QPDFFormFieldObjectHelper::isChecked
-
API was defined, but .cc had no implementation. PDF 2.0 manual is surprisingly unclear as to on/off values, giving /Yes in an example and /Off in descriptive text as "not on".
-
In QPDF::getAllPagesInternal include the /Kids array in the visited set for loop detection. Fixes oss-fuzz issue 411312393
-
Adjusting for under/overflow by repeated incrementing/decrementing can cause excessive runtime with invalid BBox coordinates. Fixes oss-fuzz issue 409905355.
-
Detection of fseeko on Android ABI level < 24 gets a false positive if _FILE_OFFSET_BITS is not set first.
-
Thanks to github user @cdosborn for the basic enhancement.
-
Only top-level XMP metadata is supposed to be left unencrypted. All other metadata is not treated specially.
-
Fix offsets in QPDF::resolveObjectsInStream warnings
-
CMake: correctly detect that timezone is not an int
-
As discussed in #1396.
-
Internally use -1 to represent a missing offset and provide a constructor overload that allows 0 as a valid offset. In QPDF::damagedPDF use the new overload.
-
Also, silently fix any angle that is a multiple of 90.
-
Rather than converting each (sequential) object id to a string, generate a string for the first id and than increment the digits in the string.
-
The simple CMake test that printf("%ld", timezone) to tell if HAVE_EXTERN_LONG_TIMEZONE, incorrectly saw an int after casting FreeBSD's char * timezone(int zone, int dst) pointer function to an int. By dividing it by 60 (as will occur in the .cc file), we ensure the test program to fail and thus HAVE_EXTERN_LONG_TIMEZONE not to be defined.
-
... to remove the /Root /StructTreeRoot and /MarkInfo entries.
-
... and use it in QPDFWriter and QPDF::generateHintStream.
-
Also, remove redundant QPDFWriter::writeBuffer.