Always check Length value for stream parsing wether or not it has filter

This commit is contained in:
Grégory Soutadé 2022-03-12 21:10:24 +01:00
parent c7c665aa8f
commit 66fdbd0342
1 changed files with 1 additions and 2 deletions

View File

@ -572,8 +572,7 @@ namespace uPDFParser
EXCEPTION(INVALID_STREAM, "No Length property at offset " << curOffset);
DataType* Length = (*object)["Length"];
// Try with a direct jump if no filter applied (Flatedecode)
if (!object->hasKey("Filter") && Length->type() == DataType::INTEGER)
if (Length->type() == DataType::INTEGER)
{
Integer* length = (Integer*)Length;
endOffset = startOffset + length->value();