[vlc-commits] [Git][videolan/vlc][master] demux: ts: fix boundaries check to read in the block
Steve Lhomme (@robUx4)
gitlab at videolan.org
Sat Jul 25 08:37:05 UTC 2026
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
f7d12646 by Steve Lhomme at 2026-07-25T08:26:36+00:00
demux: ts: fix boundaries check to read in the block
If the buffer (+2) is smaller than the skipped data we should not read
after the skipped data.
So far these data were never read, unless there was a bogus skip. So there
might be some behavior changes.
Ref. #29657
- - - - -
1 changed file:
- modules/demux/mpeg/ts.c
Changes:
=====================================
modules/demux/mpeg/ts.c
=====================================
@@ -1615,12 +1615,12 @@ static void ParsePESDataChain( demux_t *p_demux, ts_pid_t *pid, block_t *p_pes,
( dcd->p_extra[1]&0x10 ) )
{
/* display length */
- if( p_pes->i_buffer + 2 <= i_skip )
+ if( p_pes->i_buffer >= i_skip + 2 )
i_length = GetWBE( &p_pes->p_buffer[i_skip] );
i_skip += 2;
}
- if( p_pes->i_buffer + 2 <= i_skip )
+ if( p_pes->i_buffer >= i_skip + 2 )
i_pes_size = GetWBE( &p_pes->p_buffer[i_skip] );
/* */
i_skip += 2;
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/f7d12646eeffd1008b655075db759ed2534485fa
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/f7d12646eeffd1008b655075db759ed2534485fa
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