gecko-dev/media/libvorbis/bug487519.patch
Matthew Gregan 3efd4dbb3f Bug 501279. Update libvorbis to r16335.
--HG--
extra : rebase_source : 04d15a3e154054fe00b3c01f3c252f5f9613e3e8
2009-07-31 17:24:16 +12:00

21 lines
607 B
Diff

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