[vlc-commits] demux: mp4: fix heap read overflow in vide handler
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:31:35 2014 +0200| [456cb8f019e409b8130622757bedf23080659b04] | committer: Jean-Baptiste Kempf
demux: mp4: fix heap read overflow in vide handler
(cherry picked from commit 3417a40402599d56395fd2ae0e55baec25e41a52)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=456cb8f019e409b8130622757bedf23080659b04
---
modules/demux/mp4/libmp4.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index cbe6e79..eaca2e6 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -1825,6 +1825,8 @@ int MP4_ReadBox_sample_vide( stream_t *p_stream, MP4_Box_t *p_box )
MP4_GET4BYTES( p_box->data.p_sample_vide->i_qt_data_size );
MP4_GET2BYTES( p_box->data.p_sample_vide->i_qt_frame_count );
+ if ( i_read < 32 )
+ MP4_READBOX_EXIT( 0 );
memcpy( &p_box->data.p_sample_vide->i_compressorname, p_peek, 32 );
p_peek += 32; i_read -= 32;
More information about the vlc-commits
mailing list