Commit edf3509b7859d359f997b198ea6915e361c941d4
1 parent
598268f6
Treat corrupt JPEG streams as unfilterable
Showing
3 changed files
with
34 additions
and
7 deletions
ChangeLog
| 1 | +2024-07-04 M Holger <m.holger@qpdf.org> | |
| 2 | + | |
| 3 | + * Treat corrupt JPEG streams as unfilterable. This avoids them | |
| 4 | + getting uncompressed when writing PDF files with decode level all. | |
| 5 | + | |
| 1 | 6 | 2024-07-02 Jay Berkenbilt <ejb@ql.org> |
| 2 | 7 | |
| 3 | 8 | * Add QPDF::setMaxWarnings to set the maximum of warnings before |
| 4 | 9 | warning suppression. |
| 5 | 10 | |
| 6 | - * Add additional options to Pl_DCT construction to limit sizes and | |
| 7 | - memory usage of compression. These are generally exposed but are | |
| 8 | - primarily intended to support fuzz tests, which have explicit | |
| 9 | - memory limits that are smaller than what is commonly seen in the | |
| 10 | - wild with PDF files. | |
| 11 | + * Add static option to Pl_DCT to limit memory usage of | |
| 12 | + decompression. The option is generally exposed but is primarily | |
| 13 | + intended to support fuzz tests, which have explicit memory limits | |
| 14 | + that are smaller than what is commonly seen in the wild with PDF | |
| 15 | + files. | |
| 16 | + | |
| 17 | + * Add static option to Pl_DCT to control whether decompression of | |
| 18 | + corrupt JPEG data is attempted. | |
| 19 | + | |
| 20 | +2024-06-29 M Holger <m.holger@qpdf.org> | |
| 21 | + | |
| 22 | + * Bug fix: in QPDFOutlineObjectHelper detect loops in the list of | |
| 23 | + direct children of an outline item. | |
| 24 | + | |
| 25 | +2024-06-27 M Holger <m.holger@qpdf.org> | |
| 26 | + | |
| 27 | + * Add sanity check in QPDF xref table reconstruction to reject | |
| 28 | + objects with impossibly large object id in order to improve | |
| 29 | + handling of severely damaged PDF files. | |
| 30 | + | |
| 31 | +2024-06-25 M Holger <m.holger@qpdf.org> | |
| 32 | + | |
| 33 | + * Detect severely damaged PDF files early. After parsing the xref | |
| 34 | + table in QPDF throw a damagedPDF exception if the root of the pages | |
| 35 | + tree is not a dictionary. | |
| 11 | 36 | |
| 12 | 37 | 2024-06-07 Jay Berkenbilt <ejb@ql.org> |
| 13 | 38 | ... | ... |
include/qpdf/Pl_DCT.hh
| ... | ... | @@ -39,7 +39,9 @@ class QPDF_DLL_CLASS Pl_DCT: public Pipeline |
| 39 | 39 | QPDF_DLL |
| 40 | 40 | static void setMemoryLimit(long limit); |
| 41 | 41 | |
| 42 | - // Treat corrupt data as a runtime error rather than attempting to decompress regardless. | |
| 42 | + // Treat corrupt data as a runtime error rather than attempting to decompress regardless. This | |
| 43 | + // is the qpdf default behaviour. To attempt to decompress corrupt data set 'treat_as_error' to | |
| 44 | + // false. | |
| 43 | 45 | // NB This is a static option affecting all Pl_DCT instances. |
| 44 | 46 | QPDF_DLL |
| 45 | 47 | static void setThrowOnCorruptData(bool treat_as_error); | ... | ... |