[vlc-commits] demux/mp4: make sure we have enough data remaining in ExtractIntlStrings
Filip Roséen
git at videolan.org
Tue Nov 22 20:38:15 CET 2016
vlc | branch: master | Filip Roséen <filip at atch.se> | 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 <fcvlcdev at free.fr>
> 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;
More information about the vlc-commits
mailing list