[vlc-commits] [Git][videolan/vlc][master] demux: ty: add some sanity checks before use video buffer

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Aug 7 10:31:31 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
ef4d48ad by Steve Lhomme at 2026-08-07T09:42:01+00:00
demux: ty: add some sanity checks before use video buffer

Fixes #30024

- - - - -


1 changed file:

- modules/demux/ty.c


Changes:

=====================================
modules/demux/ty.c
=====================================
@@ -699,7 +699,8 @@ static int DemuxRecVideo( demux_t *p_demux, ty_rec_hdr_t *rec_hdr, block_t *p_bl
          * Do NOT Pass the PES Header to the MPEG2 codec */
         size_t search_len = __MIN(p_block_in->i_buffer - sizeof(ty_VideoPacket), 5);
         esOffset1 = find_es_header( ty_VideoPacket, p_block_in->p_buffer, p_block_in->i_buffer, search_len );
-        if( esOffset1 != -1 )
+        if( esOffset1 != -1 &&
+            (size_t)esOffset1 + VIDEO_PTS_OFFSET + 5 <= p_block_in->i_buffer ) // to read the PTS
         {
             //msg_Dbg(p_demux, "Video PES hdr in pkt type 0x%02x at offset %d",
                 //subrec_type, esOffset1);



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

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