Make vorbis_synthesis_trackonly error handling match vorbis_synthesis per Mozilla...
authorGregory Maxwell <greg@xiph.org>
Thu, 30 Sep 2010 03:41:41 +0000 (03:41 +0000)
committerGregory Maxwell <greg@xiph.org>
Thu, 30 Sep 2010 03:41:41 +0000 (03:41 +0000)
svn path=/trunk/vorbis/; revision=17474

lib/synthesis.c

index bcf99c5..6ed554d 100644 (file)
@@ -114,6 +114,10 @@ int vorbis_synthesis_trackonly(vorbis_block *vb,ogg_packet *op){
   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){
     vb->lW=oggpack_read(opb,1);