[vlc-commits] demux: mp4: fix heap overflow reading esds

Francois Cartegnie git at videolan.org
Sun Sep 28 07:18:47 CEST 2014


vlc/vlc-2.2 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sat Sep 27 18:29:13 2014 +0200| [86271ad8ba8e61fec437c9c8a6b71686712996bc] | committer: Jean-Baptiste Kempf

demux: mp4: fix heap overflow reading esds

(cherry picked from commit 44c7fb66827345a5179b4f919c7234c65d569db1)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=86271ad8ba8e61fec437c9c8a6b71686712996bc
---

 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 7bfc620..cbe6e79 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -1242,6 +1242,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