Jean-Baptiste Kempf pushed to branch 3.0.x at VideoLAN / VLC
Commits:
84e055cf by Khalid Masum at 2025-11-13T15:13:20+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)
(cherry picked from commit 5ca90ea1) (rebased)
rebased:
- vlc_tick_from_samples doesn't exist in VLC 3
- - - - -
1 changed file:
- modules/demux/mpeg/ts.c
Changes:
=====================================
modules/demux/mpeg/ts.c
=====================================
@@ -1303,7 +1303,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 = CLOCK_FREQ * i_den / i_num;
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/commit/84e055cf36aed1abf4513b01d849037d9726eb98
--
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/commit/84e055cf36aed1abf4513b01d849037d9726eb98
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits