From 9b28933647f0a3ed535dd488c4526b75d1c10fc6 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Thu, 4 Nov 2021 11:55:36 -0400 Subject: 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. --- manual/qpdf-manual.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'manual/qpdf-manual.xml') diff --git a/manual/qpdf-manual.xml b/manual/qpdf-manual.xml index 7cd22459..026d6039 100644 --- a/manual/qpdf-manual.xml +++ b/manual/qpdf-manual.xml @@ -5104,6 +5104,16 @@ print "\n"; receive warnings on certain recoverable conditions. + + + Add an extra check to the library to detect when foreign + objects are inserted directly (instead of using + QPDF::copyForeignObject) at the time of + insertion rather than when the file is written. Catching the + error sooner makes it much easier to locate the incorrect + code. + + -- cgit v1.2.3-54-g00ecf