[vlc-commits] [Git][videolan/vlc][3.0.x] demux: ty: check proper boundaries before accessing p_sys->rec_hdrs

Steve Lhomme (@robUx4) gitlab at videolan.org
Sat Aug 15 06:45:27 UTC 2026



Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC


Commits:
591033b6 by tianshuo han at 2026-08-15T06:26:02+00:00
demux: ty: check proper boundaries before accessing p_sys->rec_hdrs

Fixes #29773

Co-authored-by: Steve Lhomme <robux4 at ycbcr.xyz>
(cherry picked from commit e6779c9a91861e73867cfb7bb920234e1157c0c6)
Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>

- - - - -


1 changed file:

- modules/demux/ty.c


Changes:

=====================================
modules/demux/ty.c
=====================================
@@ -1593,7 +1593,7 @@ static int ty_stream_seek_time(demux_t *p_demux, uint64_t l_seek_time)
             p_sys->i_stuff_cnt = 0;
             get_chunk_header(p_demux);
             // check ty PTS for the SEQ entry in this chunk
-            if (p_sys->i_seq_rec < 0 || p_sys->i_seq_rec > p_sys->i_num_recs) {
+            if (p_sys->i_seq_rec < 0 || p_sys->i_seq_rec >= p_sys->i_num_recs) {
                 msg_Err(p_demux, "no SEQ hdr in chunk; table had one.");
                 /* Seek to beginning of original chunk & reload it */
                 if(vlc_stream_Seek(p_demux->s, (l_cur_pos / CHUNK_SIZE) * CHUNK_SIZE) != VLC_SUCCESS)



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/591033b60000d283b834d0092c496dd643c5f8cc

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/591033b60000d283b834d0092c496dd643c5f8cc
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list