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

libmp4: fix segfault

Le 28/10/2014 23:11, Frédéric Yhuel a écrit :
>  static int MP4_NextBox( stream_t *p_stream, MP4_Box_t *p_box )
>  {
> -    MP4_Box_t box;
> +    MP4_Box_t box = {0};
>
>      if( !p_box )
>      {
>

Better fail early. (untested, no sample)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent cd11c84d
......@@ -150,7 +150,8 @@ static int MP4_NextBox( stream_t *p_stream, MP4_Box_t *p_box )
if( !p_box )
{
MP4_ReadBoxCommon( p_stream, &box );
if ( !MP4_ReadBoxCommon( p_stream, &box ) )
return 0;
p_box = &box;
}
......
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