[FFmpeg-cvslog] r19976 - trunk/libavcodec/vorbis_dec.c

michael subversion
Wed Sep 23 10:35:29 CEST 2009


Author: michael
Date: Wed Sep 23 10:35:29 2009
New Revision: 19976

Log:
Check dimensions against 0 too.
39_vorbis_zero_dims.patch from chrome

Modified:
   trunk/libavcodec/vorbis_dec.c

Modified: trunk/libavcodec/vorbis_dec.c
==============================================================================
--- trunk/libavcodec/vorbis_dec.c	Wed Sep 23 09:46:51 2009	(r19975)
+++ trunk/libavcodec/vorbis_dec.c	Wed Sep 23 10:35:29 2009	(r19976)
@@ -244,8 +244,8 @@ static int vorbis_parse_setup_hdr_codebo
         }
 
         codebook_setup->dimensions=get_bits(gb, 16);
-        if (codebook_setup->dimensions>16) {
-            av_log(vc->avccontext, AV_LOG_ERROR, " %"PRIdFAST16". Codebook's dimension is too large (%d). \n", cb, codebook_setup->dimensions);
+        if (codebook_setup->dimensions>16||codebook_setup->dimensions==0) {
+            av_log(vc->avccontext, AV_LOG_ERROR, " %"PRIdFAST16". Codebook's dimension is invalid (%d). \n", cb, codebook_setup->dimensions);
             goto error;
         }
         entries=get_bits(gb, 24);



More information about the ffmpeg-cvslog mailing list