-
Move all array-specific methods to new class qpdf::Array.
-
Move all dictionary specific methods to BaseDictionary. Create new subclass Dictionary to allow QPDFObjectHandle to access the moved methods.
-
Replace data member oh with accessors. Remove redundant overloads from QPDFObjGen::set.
-
The new class is only usable as base classes and does not support direct instantiation or upcasting. Add operators to convert to bool, QPDFObjectHandle and QPDFObjGen. Derive QPDFObjectHandle from BaseHandle and make final.
-
#1349 introduced a limit on the maximum size of arrays and dictionaries contained in objects that generate errors during parsing, and #1354 reduced that limit to 5000 objects. However, the limit was only imposed once a further error was encountered. Stop adding objects to containers once the limit is reached. Fixes oss-fuzz issue 398060137
-
Remove member encoded and encode strings only when required. Encoded is only used when writing JSON. Since most JSON writing is now done on the fly without creating a JSON representation, creating and storing the encoded string in almost all cases no longer serves any purpose.
-
If duplicate keys are encountered, overwrite earlier values with the latest value.
-
Except for virtual functions to avoid the need for users to update code.
-
Also, move Buffer::Members definition to Buffer.cc
-
Fix the logic to accept a top-level `zopfli.h` header, as that is the location used by upstream's build system.
-
Removing it was ABI-breaking. I must have done it forgetting Pl_DCT.hh was in the public API.
-
This improves indentation of long strings. This commit also fixes some trailing whitespace in ChangeLog.
-
Reduce the container size for which a single bad token will cause a failure from 100,000 to 5,000. Count missing dictionary keys as errors.
-
If a flate memory limit is set, reject decode parameters that would cause the limit to be exceeded and treat stream as unfilterable. Fixes oss-fuzz issue 394463491
-
The stream filter is only used if the stream is filterable, therefore there is no point continuing to set decode parameters once it is recognized that the stream is not filterable.
-
Fail if a bad token is encountered while parsing an array or dictionary with more than 100,000 elements. Fixes oss-fuzz case 388571629.
-
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.
-
This requires a special build option.
-
Check for direct outline items. Fixes oss-fuzz case 389339260.
-
Fixes oss-fuzz cases 376305073, 389974979 and 391974927.
-
When recovering XRef streams, start with the stream with the largest /Size rather than the largest offset. Also, if reconstruction fails to find a trailer with a valid /Root entry search for a root object.
-
Change QPDFWriter stream_decode_level default to qpdf_dl_generalized (fixes #1286)
-
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