media/libtremor/bug719612.patch
author Andrew Halberstadt <ahalberstadt@mozilla.com>
Thu, 05 May 2016 17:21:12 -0400
changeset 364414 654d411978a76776ee96e616c5f3369a026e0be4
parent 84981 a4d83f2fb3f2e07f749f8353b1793222dfac378a
permissions -rw-r--r--
Bug 1270506 - [mozlint] Add python flake8 linter, r?smacleod For now, only the following two directories will be linted: python/mozlint tools/lint New directories can be added by adding them to the 'include' directive in tools/lint/flake8.lint. They all default to the configuration specified in topsrcdir/.flake8. Subdirectories can override this configuration by creating their own .flake8 file. MozReview-Commit-ID: Eag48Lnkp3l

diff --git a/media/libtremor/lib/tremor_floor1.c b/media/libtremor/lib/tremor_floor1.c
--- a/media/libtremor/lib/tremor_floor1.c
+++ b/media/libtremor/lib/tremor_floor1.c
@@ -103,16 +103,17 @@ static vorbis_info_floor *floor1_unpack 
 
   /* read the post list */
   info->mult=oggpack_read(opb,2)+1;     /* only 1,2,3,4 legal now */ 
   rangebits=oggpack_read(opb,4);
   if(rangebits<0)goto err_out;
 
   for(j=0,k=0;j<info->partitions;j++){
     count+=info->class_dim[info->partitionclass[j]]; 
+    if(count>VIF_POSIT)goto err_out;
     for(;k<count;k++){
       int t=info->postlist[k+2]=oggpack_read(opb,rangebits);
       if(t<0 || t>=(1<<rangebits))
 	goto err_out;
     }
   }
   info->postlist[0]=0;
   info->postlist[1]=1<<rangebits;