[vlc-commits] demux: mp4: fix heap read overflow in vide handler
Francois Cartegnie
git at videolan.org
Sat Sep 27 18:33:23 CEST 2014
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sat Sep 27 18:31:35 2014 +0200| [3417a40402599d56395fd2ae0e55baec25e41a52] | committer: Francois Cartegnie
demux: mp4: fix heap read overflow in vide handler
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3417a40402599d56395fd2ae0e55baec25e41a52
---
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 63d7db4..84b3f80 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -1907,6 +1907,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