Skip to content
Permalink
Browse files Browse the repository at this point in the history
Exit the max size loop when there's nothing left possible to find
DataStream.getFilePointer() is not correct in this context. It might force to
exit too early.
  • Loading branch information
robUx4 committed Jan 22, 2018
1 parent b099f42 commit b66ca47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/EbmlElement.cpp
Expand Up @@ -478,7 +478,7 @@ EbmlElement * EbmlElement::FindNextElement(IOCallback & DataStream, const EbmlSe
ReadIndex = SizeIdx - 1;
memmove(&PossibleIdNSize[0], &PossibleIdNSize[1], ReadIndex);
UpperLevel = UpperLevel_original;
} while ( MaxDataSize > DataStream.getFilePointer() - SizeIdx + PossibleID_Length );
} while ( MaxDataSize >= ReadSize );

return NULL;
}
Expand Down

0 comments on commit b66ca47

Please sign in to comment.