Commit cadfe695 authored by Francois Cartegnie's avatar Francois Cartegnie

demux: mp4: have ReadBox check final size

parent 8543c65f
......@@ -3981,6 +3981,15 @@ static MP4_Box_t *MP4_ReadBox( stream_t *p_stream, MP4_Box_t *p_father )
free( p_box );
return NULL;
}
if( p_father && p_father->i_size > 0 &&
p_father->i_pos + p_father->i_size < p_box->i_pos + p_box->i_size )
{
msg_Dbg( p_stream, "out of bound child" );
free( p_box );
return NULL;
}
if( !p_box->i_size )
{
msg_Dbg( p_stream, "found an empty box (null 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