diff options
Diffstat (limited to 'libqpdf/QPDFWriter.cc')
-rw-r--r-- | libqpdf/QPDFWriter.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libqpdf/QPDFWriter.cc b/libqpdf/QPDFWriter.cc index 028f73dc..83785465 100644 --- a/libqpdf/QPDFWriter.cc +++ b/libqpdf/QPDFWriter.cc @@ -1198,6 +1198,14 @@ void QPDFWriter::enqueueObject(QPDFObjectHandle object) { if (object.isIndirect()) { + // This owner check should really be done for all objects, not + // just indirect objects. As of the time of the release of + // qpdf 11, it is known that there are cases of direct objects + // from other files getting copied into multiple QPDF objects. + // This definitely happens in the page splitting code. If we + // were to implement strong checks to prevent objects from + // having multiple owners, once that was complete phased in, + // this check could be moved outside the if statement. if (object.getOwningQPDF() != &(this->m->pdf)) { QTC::TC("qpdf", "QPDFWriter foreign object"); throw std::logic_error( |