aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDF.cc
diff options
context:
space:
mode:
authorm-holger <m-holger@kubitscheck.org>2022-09-28 17:58:42 +0200
committerJay Berkenbilt <jberkenbilt@users.noreply.github.com>2022-10-01 17:17:39 +0200
commitc63fb86c01c5635a3e7f28c3b66de7cf908ef6d6 (patch)
tree4f7c59efe87c98a90b17b6194df7c82d1de13a83 /libqpdf/QPDF.cc
parentcb0a6be983b7e4ee2784991273777579dcb90b9d (diff)
downloadqpdf-c63fb86c01c5635a3e7f28c3b66de7cf908ef6d6.tar.zst
Inline call to QPDFObjectHandle::parse in QPDF::readObject
Diffstat (limited to 'libqpdf/QPDF.cc')
-rw-r--r--libqpdf/QPDF.cc14
1 files changed, 6 insertions, 8 deletions
diff --git a/libqpdf/QPDF.cc b/libqpdf/QPDF.cc
index 57e3f592..5cad3caf 100644
--- a/libqpdf/QPDF.cc
+++ b/libqpdf/QPDF.cc
@@ -22,6 +22,7 @@
#include <qpdf/QPDFExc.hh>
#include <qpdf/QPDFLogger.hh>
#include <qpdf/QPDFObject_private.hh>
+#include <qpdf/QPDFParser.hh>
#include <qpdf/QPDF_Array.hh>
#include <qpdf/QPDF_Dictionary.hh>
#include <qpdf/QPDF_Null.hh>
@@ -530,7 +531,7 @@ void
QPDF::inParse(bool v)
{
if (this->m->in_parse == v) {
- // This happens of QPDFObjectHandle::parseInternal tries to
+ // This happens if QPDFParser::parse tries to
// resolve an indirect object while it is parsing.
throw std::logic_error(
"QPDF: re-entrant parsing detected. This is a qpdf bug."
@@ -1413,13 +1414,10 @@ QPDF::readObject(
decrypter_ph = std::make_shared<StringDecrypter>(this, og);
decrypter = decrypter_ph.get();
}
- QPDFObjectHandle object = QPDFObjectHandle::parse(
- input,
- this->m->last_object_description,
- this->m->tokenizer,
- empty,
- decrypter,
- this);
+ auto object =
+ QPDFParser(
+ input, m->last_object_description, m->tokenizer, decrypter, this)
+ .parse(empty, false);
if (empty) {
// Nothing in the PDF spec appears to allow empty objects, but
// they have been encountered in actual PDF files and Adobe