media/libvorbis/bug487519.patch
author Mitchell Field <mitch_1_2@live.com.au>
Tue, 13 Oct 2009 15:22:56 +0200
changeset 33790 88be36f58e335c79c1d9e02b5fff57f47d26a460
parent 31034 c6692a8f3f2725faadef43edd3142e533b452e62
permissions -rw-r--r--
Bug 462381 - sprinkle magic PARALLEL_DIRS fairy dust about the build system; Build more stuff in parallel (v3) r=(benjamin, cbiesinger, smontagu, ted.mielczarek)

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){