aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorm-holger <m-holger@kubitscheck.org>2022-11-12 19:10:16 +0100
committerm-holger <m-holger@kubitscheck.org>2023-03-19 21:07:53 +0100
commitd8acccd5c8fff308a0010f787eedc594fa3e5ee9 (patch)
tree59591ebba800d6c043663f717189b0c373d58e48 /include
parent1e53da74bc3cf0cbd3bd3dae2890e83ad33c3ed4 (diff)
downloadqpdf-d8acccd5c8fff308a0010f787eedc594fa3e5ee9.tar.zst
Warn if catalog type entry is invalid (fixes #810)
Diffstat (limited to 'include')
-rw-r--r--include/qpdf/QPDF.hh20
1 files changed, 17 insertions, 3 deletions
diff --git a/include/qpdf/QPDF.hh b/include/qpdf/QPDF.hh
index 13b66977..4541db64 100644
--- a/include/qpdf/QPDF.hh
+++ b/include/qpdf/QPDF.hh
@@ -910,8 +910,7 @@ class QPDF
}
};
- // The ParseGuard class allows QPDFObjectHandle to detect
- // re-entrant parsing.
+ // The ParseGuard class allows QPDFParser to detect re-entrant parsing.
class ParseGuard
{
friend class QPDFParser;
@@ -933,7 +932,7 @@ class QPDF
QPDF* qpdf;
};
- // Pipe class is restricted to QPDF_Stream
+ // Pipe class is restricted to QPDF_Stream.
class Pipe
{
friend class QPDF_Stream;
@@ -961,6 +960,20 @@ class QPDF
}
};
+ // JobSetter class is restricted to QPDFJob.
+ class JobSetter
+ {
+ friend class QPDFJob;
+
+ private:
+ // Enable enhanced warnings for pdf file checking.
+ static void
+ setCheckMode(QPDF& qpdf, bool val)
+ {
+ qpdf.m->check_mode = val;
+ }
+ };
+
// For testing only -- do not add to DLL
static bool test_json_validators();
@@ -1698,6 +1711,7 @@ class QPDF
bool ignore_xref_streams{false};
bool suppress_warnings{false};
bool attempt_recovery{true};
+ bool check_mode{false};
std::shared_ptr<EncryptionParameters> encp;
std::string pdf_version;
std::map<QPDFObjGen, QPDFXRefEntry> xref_table;