Commit d69f7fdb authored by Francois Cartegnie's avatar Francois Cartegnie Committed by Jean-Baptiste Kempf

demux: mp4: have ReadBox check final size

(cherry picked from commit cadfe695b4c138aa8708dc7c8cc5ecbdad77696c)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 739c7a82
......@@ -3576,6 +3576,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