media/libtremor/bug719612.patch
author Cameron McCormack <cam@mcc.id.au>
Fri, 28 Sep 2012 17:17:29 +1000
changeset 114718 6786b5f4ee4a79d22df9cc6931a36f1f99ca81be
parent 87423 a4d83f2fb3f2e07f749f8353b1793222dfac378a
permissions -rw-r--r--
Bug 655877 - Part 44: Fix some bidi tests whose rendering behavior has changed a bit with the new SVG text support. r=smontagu

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;