Commit 370399a978dc524b293d27438c449d9bfabd14ee

Authored by m-holger
1 parent 27791cc8

Bug fix - don't ignore non-dictionary objects when searching for the

linearization parameter dictionary.

Spec states that that linearization parameter dictionary must be the first
object.
Showing 1 changed file with 1 additions and 2 deletions
libqpdf/QPDF_linearization.cc
@@ -113,8 +113,7 @@ QPDF::isLinearized() @@ -113,8 +113,7 @@ QPDF::isLinearized()
113 113
114 QPDFTokenizer::Token t1 = readToken(*m->file); 114 QPDFTokenizer::Token t1 = readToken(*m->file);
115 if (t1.isInteger() && readToken(*m->file).isInteger() && 115 if (t1.isInteger() && readToken(*m->file).isInteger() &&
116 - readToken(*m->file).isWord("obj") &&  
117 - readToken(*m->file).getType() == QPDFTokenizer::tt_dict_open) { 116 + readToken(*m->file).isWord("obj")) {
118 lindict_obj = toI(QUtil::string_to_ll(t1.getValue().c_str())); 117 lindict_obj = toI(QUtil::string_to_ll(t1.getValue().c_str()));
119 } 118 }
120 pos = buffer.find_first_not_of("0123456789"sv, pos); 119 pos = buffer.find_first_not_of("0123456789"sv, pos);