[vlc-devel] commit: Fix (yet another) TiVo demux overflow. ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat Oct 18 21:55:04 CEST 2008


vlc | branch: 0.9-bugfix | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sat Oct 18 22:19:49 2008 +0300| [fde9e1cc1fe1ec9635169fa071e42b3aa6436033] | committer: Rémi Denis-Courmont 

Fix (yet another) TiVo demux overflow.

Reported by Tobias Klein <tk at trapkit.de>
(cherry picked from commit 26d92b87bba99b5ea2e17b7eaa39c462d65e9133)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fde9e1cc1fe1ec9635169fa071e42b3aa6436033
---

 modules/demux/ty.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/modules/demux/ty.c b/modules/demux/ty.c
index 231fdda..f7d42bc 100644
--- a/modules/demux/ty.c
+++ b/modules/demux/ty.c
@@ -1647,12 +1647,14 @@ static void parse_master(demux_t *p_demux)
     /* parse all the entries */
     p_sys->seq_table = malloc(p_sys->i_seq_table_size * sizeof(ty_seq_table_t));
     for (i=0; i<p_sys->i_seq_table_size; i++) {
-        stream_Read(p_demux->s, mst_buf, 8 + i_map_size);
+        stream_Read(p_demux->s, mst_buf, 8);
         p_sys->seq_table[i].l_timestamp = U64_AT(&mst_buf[0]);
         if (i_map_size > 8) {
             msg_Err(p_demux, "Unsupported SEQ bitmap size in master chunk");
+            stream_Read(p_demux->s, NULL, i_map_size);
             memset(p_sys->seq_table[i].chunk_bitmask, i_map_size, 0);
         } else {
+            stream_Read(p_demux->s, mst_buf + 8, i_map_size);
             memcpy(p_sys->seq_table[i].chunk_bitmask, &mst_buf[8], i_map_size);
         }
     }




More information about the vlc-devel mailing list