[vlc-commits] Added a check against block size in FLAC packetizer.

Laurent Aimar git at videolan.org
Sun Jun 26 00:47:44 CEST 2011


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Jun 26 00:46:55 2011 +0200| [cc02b250c8eda5117a6170273b2cf34854a16928] | committer: Laurent Aimar

Added a check against block size in FLAC packetizer.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cc02b250c8eda5117a6170273b2cf34854a16928
---

 modules/packetizer/flac.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/modules/packetizer/flac.c b/modules/packetizer/flac.c
index d9a2be3..d45fb5a 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 )



More information about the vlc-commits mailing list