Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
87b23020 by Steve Lhomme at 2025-08-13T09:14:11+00:00
demux: asf: check the duration doesn't overflow
Fixes #29003
- - - - -
1 changed file:
- modules/demux/asf/asf.c
Changes:
=====================================
modules/demux/asf/asf.c
=====================================
@@ -40,6 +40,7 @@
#include <vlc_vout.h>
#include <limits.h>
+#include <stdckdint.h>
#include "asfpacket.h"
#include "libasf.h"
@@ -1256,8 +1257,9 @@ static int DemuxInit( demux_t *p_demux )
p_sys->p_fp->i_min_data_packet_size;
/* calculate the time duration in micro-s */
- p_sys->i_length = VLC_TICK_FROM_MSFTIME(p_sys->p_fp->i_play_duration) *
- (vlc_tick_t)i_count /
+ if ( ckd_mul(&p_sys->i_length,
VLC_TICK_FROM_MSFTIME(p_sys->p_fp->i_play_duration), i_count) )
+ p_sys->i_length = 0;
+ p_sys->i_length = p_sys->i_length /
(vlc_tick_t)p_sys->p_fp->i_data_packets_count;
if( p_sys->i_length <= p_sys->p_fp->i_preroll )
p_sys->i_length = 0;
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/commit/87b230208fe2946b6edf0338e5ddced1b1bc9a8b
--
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/commit/87b230208fe2946b6edf0338e5ddced1b1bc9a8b
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits