[vlc-commits] demux: libmp4: fix oob access

Francois Cartegnie git at videolan.org
Wed Sep 9 11:46:28 CEST 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Sep  7 23:15:36 2015 +0200| [482a404fc64ae81256836f1a058c4c4eb5be236a] | committer: Francois Cartegnie

demux: libmp4: fix oob access

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=482a404fc64ae81256836f1a058c4c4eb5be236a
---

 modules/demux/mp4/libmp4.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index 97f4290..956cda0 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -150,11 +150,10 @@ int MP4_PeekBoxHeader( stream_t *p_stream, MP4_Box_t *p_box )
         /* XXX size of 0 means that the box extends to end of file */
     }
 
-    if( p_box->i_type == ATOM_uuid )
+    if( p_box->i_type == ATOM_uuid && i_read >= 16 )
     {
         /* get extented type on 16 bytes */
         GetUUID( &p_box->i_uuid, p_peek );
-        p_peek += 16; i_read -= 16;
     }
     else
     {



More information about the vlc-commits mailing list