aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2021-11-04 16:55:36 +0100
committerJay Berkenbilt <ejb@ql.org>2021-11-04 17:29:42 +0100
commit9b28933647f0a3ed535dd488c4526b75d1c10fc6 (patch)
tree6cd87c2f661653c3afac8ba95a37e338e14e3f36 /include
parent73752683c936af0f5a556982c2c59516d2914ee3 (diff)
downloadqpdf-9b28933647f0a3ed535dd488c4526b75d1c10fc6.tar.zst
Check object ownership when adding
When adding a QPDFObjectHandle to an array or dictionary, if possible, check if the new object belongs to the same QPDF. This makes it much easier to find incorrect code than waiting for the situation to be detected when the file is written.
Diffstat (limited to 'include')
-rw-r--r--include/qpdf/QPDFObjectHandle.hh1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/qpdf/QPDFObjectHandle.hh b/include/qpdf/QPDFObjectHandle.hh
index e57179b5..2f2b3ebc 100644
--- a/include/qpdf/QPDFObjectHandle.hh
+++ b/include/qpdf/QPDFObjectHandle.hh
@@ -1336,6 +1336,7 @@ class QPDFObjectHandle
std::vector<QPDFObjectHandle> arrayOrStreamToStreamArray(
std::string const& description, std::string& all_description);
static void warn(QPDF*, QPDFExc const&);
+ void checkOwnership(QPDFObjectHandle const&) const;
bool initialized;