[vlc-commits] [Git][videolan/vlc][master] demux: ts: fix possible divide by 0 at j2k parse
Steve Lhomme (@robUx4)
gitlab at videolan.org
Tue Oct 14 06:42:50 UTC 2025
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
5ca90ea1 by Khalid Masum at 2025-10-14T05:42:07+00:00
demux: ts: fix possible divide by 0 at j2k parse
i_num, which comes from an untrusted source is used as a divisor in
vlc_tick_from_samples.
Fixes: #29369 (Coverity: 1666134)
- - - - -
1 changed file:
- modules/demux/mpeg/ts.c
Changes:
=====================================
modules/demux/mpeg/ts.c
=====================================
@@ -1350,7 +1350,7 @@ static block_t *J2K_Parse( demux_t *p_demux, block_t *p_block, bool b_interlaced
uint16_t i_den = GetWBE( &p_buf[8] );
uint16_t i_num = GetWBE( &p_buf[10] );
- if( i_den == 0 )
+ if( i_den == 0 || i_num == 0 )
goto invalid;
p_block->i_length = vlc_tick_from_samples( i_den, i_num );
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/5ca90ea1e906909a61c570d888ab203ac6d709e1
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/5ca90ea1e906909a61c570d888ab203ac6d709e1
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list