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

Steve Lhomme (@robUx4) gitlab at videolan.org
Sat Aug 1 13:45:18 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
e6779c9a by tianshuo han at 2026-08-01T12:23:31+00:00
demux: ty: check proper boundaries before accessing p_sys->rec_hdrs

Fixes #29773

Co-authored-by: Steve Lhomme <robux4 at ycbcr.xyz>

- - - - -


1 changed file:

- modules/demux/ty.c


Changes:

=====================================
modules/demux/ty.c
=====================================
@@ -1584,7 +1584,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/e6779c9a91861e73867cfb7bb920234e1157c0c6

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/e6779c9a91861e73867cfb7bb920234e1157c0c6
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