vlc | branch: master | Filip Roséen <[email protected]> | Thu Nov 17 05:21:11 2016 +0100| [b49d6f452e9b1369addcb1bab388981080f07348] | committer: Francois Cartegnie
demux/mp4: make sure we have enough data remaining in ExtractIntlStrings The previous implementation would assume that we would always have at least 4 bytes of data left in the pending buffer, which can cause us to read more bytes than available inside the loop. This change make sure that we do not continue parsing if this happens. Signed-off-by: Francois Cartegnie <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b49d6f452e9b1369addcb1bab388981080f07348 --- modules/demux/mp4/meta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/demux/mp4/meta.c b/modules/demux/mp4/meta.c index 2fb569e..315c1b4 100644 --- a/modules/demux/mp4/meta.c +++ b/modules/demux/mp4/meta.c @@ -261,7 +261,7 @@ static int ExtractIntlStrings( vlc_meta_t *p_meta, MP4_Box_t *p_box ) char const* p_peek = p_box->data.p_binary->p_blob; uint64_t i_read = p_box->data.p_binary->i_blob; - while( i_read ) + while( i_read >= 4 ) { uint16_t i_len, i_lang; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
