Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/EbmlMaster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,13 @@ void EbmlMaster::Read(EbmlStream & inDataStream, const EbmlSemanticContext & sCo

if (UpperEltFound) {
--UpperEltFound;
if (UpperEltFound > 0 || MaxSizeToRead <= 0)
if (UpperEltFound > 0)
goto processCrc;
if (MaxSizeToRead <= 0) {
delete FoundElt;
FoundElt = nullptr;
goto processCrc;
}
ElementLevelA = FoundElt;
}

Expand All @@ -372,6 +377,11 @@ void EbmlMaster::Read(EbmlStream & inDataStream, const EbmlSemanticContext & sCo
UpperEltFound--;
if (UpperEltFound > 0 || MaxSizeToRead <= 0)
goto processCrc;
if (MaxSizeToRead <= 0) {
delete FoundElt;
FoundElt = nullptr;
goto processCrc;
}
ElementLevelA = FoundElt;
continue;
}
Expand Down
Loading