LibPDF: Do not assume value is an object in parse_indirect_value

This commit is contained in:
Matthew Olsson 2021-05-22 15:25:27 -07:00 committed by Ali Mohammad Pur
parent e401ff0802
commit 8c7ebc7a3f
Notes: sideshowbarker 2024-07-18 17:26:54 +09:00

View file

@ -339,10 +339,9 @@ NonnullRefPtr<IndirectValue> Parser::parse_indirect_value(int index, int generat
if (matches_eol())
consume_eol();
auto value = parse_value();
VERIFY(value.is_object());
VERIFY(m_reader.matches("endobj"));
return make_object<IndirectValue>(index, generation, value.as_object());
return make_object<IndirectValue>(index, generation, value);
}
NonnullRefPtr<IndirectValue> Parser::parse_indirect_value()