mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-22 10:58:58 +00:00
Treat corrupt JPEG streams as unfilterable
This commit is contained in:
parent
598268f6ad
commit
edf3509b78
35
ChangeLog
35
ChangeLog
@ -1,13 +1,38 @@
|
|||||||
|
2024-07-04 M Holger <m.holger@qpdf.org>
|
||||||
|
|
||||||
|
* Treat corrupt JPEG streams as unfilterable. This avoids them
|
||||||
|
getting uncompressed when writing PDF files with decode level all.
|
||||||
|
|
||||||
2024-07-02 Jay Berkenbilt <ejb@ql.org>
|
2024-07-02 Jay Berkenbilt <ejb@ql.org>
|
||||||
|
|
||||||
* Add QPDF::setMaxWarnings to set the maximum of warnings before
|
* Add QPDF::setMaxWarnings to set the maximum of warnings before
|
||||||
warning suppression.
|
warning suppression.
|
||||||
|
|
||||||
* Add additional options to Pl_DCT construction to limit sizes and
|
* Add static option to Pl_DCT to limit memory usage of
|
||||||
memory usage of compression. These are generally exposed but are
|
decompression. The option is generally exposed but is primarily
|
||||||
primarily intended to support fuzz tests, which have explicit
|
intended to support fuzz tests, which have explicit memory limits
|
||||||
memory limits that are smaller than what is commonly seen in the
|
that are smaller than what is commonly seen in the wild with PDF
|
||||||
wild with PDF files.
|
files.
|
||||||
|
|
||||||
|
* Add static option to Pl_DCT to control whether decompression of
|
||||||
|
corrupt JPEG data is attempted.
|
||||||
|
|
||||||
|
2024-06-29 M Holger <m.holger@qpdf.org>
|
||||||
|
|
||||||
|
* Bug fix: in QPDFOutlineObjectHelper detect loops in the list of
|
||||||
|
direct children of an outline item.
|
||||||
|
|
||||||
|
2024-06-27 M Holger <m.holger@qpdf.org>
|
||||||
|
|
||||||
|
* Add sanity check in QPDF xref table reconstruction to reject
|
||||||
|
objects with impossibly large object id in order to improve
|
||||||
|
handling of severely damaged PDF files.
|
||||||
|
|
||||||
|
2024-06-25 M Holger <m.holger@qpdf.org>
|
||||||
|
|
||||||
|
* Detect severely damaged PDF files early. After parsing the xref
|
||||||
|
table in QPDF throw a damagedPDF exception if the root of the pages
|
||||||
|
tree is not a dictionary.
|
||||||
|
|
||||||
2024-06-07 Jay Berkenbilt <ejb@ql.org>
|
2024-06-07 Jay Berkenbilt <ejb@ql.org>
|
||||||
|
|
||||||
|
@ -39,7 +39,9 @@ class QPDF_DLL_CLASS Pl_DCT: public Pipeline
|
|||||||
QPDF_DLL
|
QPDF_DLL
|
||||||
static void setMemoryLimit(long limit);
|
static void setMemoryLimit(long limit);
|
||||||
|
|
||||||
// Treat corrupt data as a runtime error rather than attempting to decompress regardless.
|
// Treat corrupt data as a runtime error rather than attempting to decompress regardless. This
|
||||||
|
// is the qpdf default behaviour. To attempt to decompress corrupt data set 'treat_as_error' to
|
||||||
|
// false.
|
||||||
// NB This is a static option affecting all Pl_DCT instances.
|
// NB This is a static option affecting all Pl_DCT instances.
|
||||||
QPDF_DLL
|
QPDF_DLL
|
||||||
static void setThrowOnCorruptData(bool treat_as_error);
|
static void setThrowOnCorruptData(bool treat_as_error);
|
||||||
|
@ -22,7 +22,7 @@ namespace
|
|||||||
};
|
};
|
||||||
|
|
||||||
long memory_limit{0};
|
long memory_limit{0};
|
||||||
bool throw_on_corrupt_data{false};
|
bool throw_on_corrupt_data{true};
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user