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

Francois Cartegnie git at videolan.org
Wed Oct 21 19:06:10 CEST 2015


vlc/vlc-2.2 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Sep  7 23:15:36 2015 +0200| [e9e1340158edfc61a1425e897eec01b0bf1a1075] | committer: Jean-Baptiste Kempf

demux: libmp4: fix oob access

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

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

 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 f220e51..d4891d4 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -114,11 +114,10 @@ int MP4_ReadBoxCommon( 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