media/libvorbis/bug487519.patch
author Matthew Gregan <kinetik@flim.org>
Fri, 31 Jul 2009 17:24:16 +1200
changeset 31034 c6692a8f3f2725faadef43edd3142e533b452e62
parent 28870 b0766717ce73ca814cd50641d16c6bc76e4dda7b
permissions -rw-r--r--
Bug 501279. Update libvorbis to r16335.

diff --git a/media/libvorbis/lib/vorbis_synthesis.c b/media/libvorbis/lib/vorbis_synthesis.c
index 8872f57..b7b2399 100644
--- a/media/libvorbis/lib/vorbis_synthesis.c
+++ b/media/libvorbis/lib/vorbis_synthesis.c
@@ -43,9 +43,14 @@ int vorbis_synthesis(vorbis_block *vb,ogg_packet *op){
 
   /* read our mode and pre/post windowsize */
   mode=oggpack_read(opb,b->modebits);
-  if(mode==-1)return(OV_EBADPACKET);
+  if(mode==-1) {
+    return(OV_EBADPACKET);
+  }
 
   vb->mode=mode;
+  if(!ci->mode_param[mode]) {
+    return(OV_EBADPACKET); 
+  }
   vb->W=ci->mode_param[mode]->blockflag;
   if(vb->W){