[vlc-commits] demux: mp4: fix heap overflow reading esds
Francois Cartegnie
git at videolan.org
Sat Sep 27 18:33:23 CEST 2014
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sat Sep 27 18:29:13 2014 +0200| [44c7fb66827345a5179b4f919c7234c65d569db1] | committer: Francois Cartegnie
demux: mp4: fix heap overflow reading esds
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=44c7fb66827345a5179b4f919c7234c65d569db1
---
modules/demux/mp4/libmp4.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index 1263723..63d7db4 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -1237,6 +1237,7 @@ static int MP4_ReadBox_esds( stream_t *p_stream, MP4_Box_t *p_box )
unsigned int i_len;
MP4_GET1BYTE( i_len );
+ i_len = __MIN(i_read, i_len);
es_descriptor.psz_URL = malloc( i_len + 1 );
if( es_descriptor.psz_URL )
{
More information about the vlc-commits
mailing list