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

demux: mp4: fix heap overflow reading esds

(cherry picked from commit 44c7fb66827345a5179b4f919c7234c65d569db1)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 72ba7990
...@@ -1242,6 +1242,7 @@ static int MP4_ReadBox_esds( stream_t *p_stream, MP4_Box_t *p_box ) ...@@ -1242,6 +1242,7 @@ static int MP4_ReadBox_esds( stream_t *p_stream, MP4_Box_t *p_box )
unsigned int i_len; unsigned int i_len;
MP4_GET1BYTE( i_len ); MP4_GET1BYTE( i_len );
i_len = __MIN(i_read, i_len);
es_descriptor.psz_URL = malloc( i_len + 1 ); es_descriptor.psz_URL = malloc( i_len + 1 );
if( es_descriptor.psz_URL ) if( es_descriptor.psz_URL )
{ {
......
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