[vlc-commits] ty: fix out of bound read on corrupt files
Clément Lecigne
git at videolan.org
Tue Mar 13 13:08:34 CET 2012
vlc/vlc-2.0 | branch: master | Clément Lecigne <clemun at gmail.com> | Tue Mar 13 14:06:59 2012 +0200| [5eaed79f225b9231399de2989cef297a0bcf0885] | committer: Rémi Denis-Courmont
ty: fix out of bound read on corrupt files
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
(cherry picked from commit 07616a8ecb95cdc0e3059b9b3f0c4a5393b1c773)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=5eaed79f225b9231399de2989cef297a0bcf0885
---
modules/demux/ty.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules/demux/ty.c b/modules/demux/ty.c
index b181a6a..a74d0a9 100644
--- a/modules/demux/ty.c
+++ b/modules/demux/ty.c
@@ -417,7 +417,7 @@ static int Demux( demux_t *p_demux )
/* parse the next chunk's record headers */
if( p_sys->b_first_chunk || p_sys->i_cur_rec >= p_sys->i_num_recs )
{
- if( get_chunk_header(p_demux) == 0 )
+ if( get_chunk_header(p_demux) == 0 || p_sys->i_num_recs == 0 )
return 0;
}
More information about the vlc-commits
mailing list