vlc | branch: master | Francois Cartegnie <fcvlc...@free.fr> | Thu Mar 15 20:13:34 2018 +0100| [adb75830489603ce5a0c78a00f6d66871ab53913] | committer: Francois Cartegnie
demux: flac: reject broken seek table > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=adb75830489603ce5a0c78a00f6d66871ab53913 --- modules/demux/flac.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/demux/flac.c b/modules/demux/flac.c index b64a02759f..1ef42b2db8 100644 --- a/modules/demux/flac.c +++ b/modules/demux/flac.c @@ -775,8 +775,9 @@ static void ParseSeekTable( demux_t *p_demux, const uint8_t *p_data, size_t i_da const int64_t i_sample = GetQWBE( &p_data[4+18*i+0] ); int j; - if( i_sample < 0 || i_sample >= INT64_MAX ) - continue; + if( i_sample < 0 || i_sample >= INT64_MAX || + GetQWBE( &p_data[4+18*i+8] ) < FLAC_STREAMINFO_SIZE ) + break; s = xmalloc( sizeof (*s) ); s->i_time_offset = i_sample * CLOCK_FREQ / i_sample_rate; _______________________________________________ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits