Commit 729469b7 authored by Steve Lhomme's avatar Steve Lhomme Committed by Hugo Beauzée-Luyssen

demux:mkv: don't crash if a child element has an unknown size and the parent doesn't

libebml should be fixed not to allow this.
Signed-off-by: default avatarHugo Beauzée-Luyssen <hugo@beauzee.fr>
parent 1242c57a
......@@ -180,10 +180,10 @@ EbmlElement *EbmlParser::Get( int n_call )
}
else {
size_t size_lvl = mi_level;
while ( size_lvl && m_el[size_lvl-1]->IsFiniteSize() &&
while ( size_lvl && m_el[size_lvl-1]->IsFiniteSize() && m_el[size_lvl]->IsFiniteSize() &&
m_el[size_lvl-1]->GetEndPosition() == m_el[size_lvl]->GetEndPosition() )
size_lvl--;
if (size_lvl == 0 || !m_el[size_lvl-1]->IsFiniteSize() )
if (size_lvl == 0 || !m_el[size_lvl-1]->IsFiniteSize() || !m_el[size_lvl]->IsFiniteSize() )
i_max_read = UINT64_MAX;
else {
uint64 top = m_el[size_lvl-1]->GetEndPosition();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment