Commit fe171633 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

mp4: fix infinite loop on malformed file

Unknown or partially read box can be loaded succesfully even if it
overflows the parent. This lead to an integer underflow and infinite
loop until memory exhaustion.

(cherry picked from commit f8c44ffc)
parent 85890067
......@@ -1524,6 +1524,10 @@ static int MP4_ReadBox_LtdContainer( stream_t *p_stream, MP4_Box_t *p_box )
break;
MP4_BoxAddChild( p_box, p_childbox );
i_entry++;
if( i_read < p_childbox->i_size )
MP4_READBOX_EXIT( 0 );
i_read -= p_childbox->i_size;
}
......
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