Bug 719612 - Update libvorbis. r=kinetik a=akeybl
authorTimothy B. Terriberry <tterribe@vt.edu>
Fri, 20 Jan 2012 22:54:44 +1300
changeset 35245 952491790deeed5144d1976ae3a393a98d6d0288
parent 35244 a46281bc813e59ce6138d9aaa7fdff332a988978
child 35246 e04e018f9ae69c5dc383cbd823a6aa694b6472d4
push id2011
push usermgregan@mozilla.com
push dateMon, 23 Jan 2012 22:42:30 +0000
reviewerskinetik, akeybl
bugs719612
milestone1.9.2.26pre
Bug 719612 - Update libvorbis. r=kinetik a=akeybl
media/libvorbis/bug719612.patch
media/libvorbis/lib/vorbis_floor1.c
media/libvorbis/update.sh
new file mode 100644
--- /dev/null
+++ b/media/libvorbis/bug719612.patch
@@ -0,0 +1,21 @@
+diff --git a/media/libvorbis/lib/vorbis_floor1.c b/media/libvorbis/lib/vorbis_floor1.c
+--- a/media/libvorbis/lib/vorbis_floor1.c
++++ b/media/libvorbis/lib/vorbis_floor1.c
+@@ -162,16 +162,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;
--- a/media/libvorbis/lib/vorbis_floor1.c
+++ b/media/libvorbis/lib/vorbis_floor1.c
@@ -155,16 +155,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;
--- a/media/libvorbis/update.sh
+++ b/media/libvorbis/update.sh
@@ -42,11 +42,12 @@ cp $1/lib/codebook.c ./lib/vorbis_codebo
 cp $1/lib/bitrate.c ./lib/vorbis_bitrate.c
 cp $1/lib/block.c ./lib/vorbis_block.c
 cp $1/include/vorbis/codec.h ./include/vorbis/codec.h
 cp $1/todo.txt ./todo.txt
 cp $1/COPYING ./COPYING
 cp $1/README ./README
 cp $1/AUTHORS ./AUTHORS
 patch -p3 < ./alloca.diff
+patch -p3 < ./bug719612.patch
 patch -p3 <bug487519.patch
 patch -p3 <bug498855.patch
 patch -p3 <bug550184.patch