From cc02b250c8eda5117a6170273b2cf34854a16928 Mon Sep 17 00:00:00 2001 From: Laurent Aimar Date: Sun, 26 Jun 2011 00:46:55 +0200 Subject: [PATCH] Added a check against block size in FLAC packetizer. --- modules/packetizer/flac.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/packetizer/flac.c b/modules/packetizer/flac.c index d9a2be3b4f..d45fb5a944 100644 --- a/modules/packetizer/flac.c +++ b/modules/packetizer/flac.c @@ -422,6 +422,10 @@ static int SyncInfo( decoder_t *p_dec, uint8_t *p_buf, i_blocksize = 256 << (i_temp - 8); break; } + if( p_sys->b_stream_info && + ( i_blocksize < p_sys->stream_info.min_blocksize || + i_blocksize > p_sys->stream_info.max_blocksize ) ) + return 0; /* Find samplerate */ switch( i_temp = p_buf[2] & 0x0f ) -- 2.11.4.GIT