From ec9e310c9ea9cee8d9e16cad2a68f0ad096f3a4b Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Wed, 30 Jan 2019 14:20:56 -0500 Subject: Refactor QPDFTokenizer's inline image handling Add a version of expectInlineImage that takes an input source and searches for EI. This is in preparation for improving the way EI is found. This commit just refactors the code without changing the functionality and adds tests to make sure the old and new code behave identically. --- libqpdf/QPDFObjectHandle.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libqpdf/QPDFObjectHandle.cc') diff --git a/libqpdf/QPDFObjectHandle.cc b/libqpdf/QPDFObjectHandle.cc index ecaa49bd..de5d56b3 100644 --- a/libqpdf/QPDFObjectHandle.cc +++ b/libqpdf/QPDFObjectHandle.cc @@ -1558,7 +1558,7 @@ QPDFObjectHandle::parseContentStream_data( // terminated the token. Read until end of inline image. char ch; input->read(&ch, 1); - tokenizer.expectInlineImage(); + tokenizer.expectInlineImage(input); QPDFTokenizer::Token t = tokenizer.readToken(input, description, true); if (t.getType() == QPDFTokenizer::tt_bad) -- cgit v1.2.3-54-g00ecf