Skip to content

Commit b66ca47

Browse files
committed
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.
1 parent b099f42 commit b66ca47

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/EbmlElement.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ EbmlElement * EbmlElement::FindNextElement(IOCallback & DataStream, const EbmlSe
478478
ReadIndex = SizeIdx - 1;
479479
memmove(&PossibleIdNSize[0], &PossibleIdNSize[1], ReadIndex);
480480
UpperLevel = UpperLevel_original;
481-
} while ( MaxDataSize > DataStream.getFilePointer() - SizeIdx + PossibleID_Length );
481+
} while ( MaxDataSize >= ReadSize );
482482

483483
return NULL;
484484
}

0 commit comments

Comments
 (0)