[vlc-commits] demux: mp4: fix heap overflow (fix #12283)

Francois Cartegnie git at videolan.org
Fri Sep 26 20:55:47 CEST 2014


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Sep 26 15:56:25 2014 +0200| [fd9a60b0178286f603ef9b3057b4ff4ab28d7a22] | committer: Francois Cartegnie

demux: mp4: fix heap overflow (fix #12283)

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

 modules/demux/mp4/libmp4.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index d0057ed..9d860b8 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -881,7 +881,9 @@ static int MP4_ReadBox_mdhd( stream_t *p_stream, MP4_Box_t *p_box )
         MP4_GET4BYTES( p_box->data.p_mdhd->i_timescale );
         MP4_GET4BYTES( p_box->data.p_mdhd->i_duration );
     }
-    p_box->data.p_mdhd->i_language_code = i_language = GetWBE( p_peek );
+
+    MP4_GET2BYTES( i_language );
+    p_box->data.p_mdhd->i_language_code = i_language;
     for( unsigned i = 0; i < 3; i++ )
     {
         p_box->data.p_mdhd->i_language[i] =



More information about the vlc-commits mailing list