Always check Length value for stream parsing wether or not it has filter
This commit is contained in:
parent
c7c665aa8f
commit
66fdbd0342
|
@ -572,8 +572,7 @@ namespace uPDFParser
|
||||||
EXCEPTION(INVALID_STREAM, "No Length property at offset " << curOffset);
|
EXCEPTION(INVALID_STREAM, "No Length property at offset " << curOffset);
|
||||||
|
|
||||||
DataType* Length = (*object)["Length"];
|
DataType* Length = (*object)["Length"];
|
||||||
// Try with a direct jump if no filter applied (Flatedecode)
|
if (Length->type() == DataType::INTEGER)
|
||||||
if (!object->hasKey("Filter") && Length->type() == DataType::INTEGER)
|
|
||||||
{
|
{
|
||||||
Integer* length = (Integer*)Length;
|
Integer* length = (Integer*)Length;
|
||||||
endOffset = startOffset + length->value();
|
endOffset = startOffset + length->value();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user