Skip to content
Browse files

Debian #534744, Mozilla #487519

Fixes crash in vorbis_synthesis: reject bad header packets
  • Loading branch information...
1 parent 20b5cdf commit 2be07f5cec835afb917d891c7a465f9f0cece3e2 @kfish committed Sep 13, 2009
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/libfishsound/vorbis.c
View
8 src/libfishsound/vorbis.c
@@ -149,9 +149,13 @@ fs_vorbis_decode (FishSound * fsound, unsigned char * buf, long bytes)
} else {
FishSoundDecoded_FloatIlv df;
FishSoundDecoded_Float dfi;
-
- if (vorbis_synthesis (&fsv->vb, &op) == 0)
+ int r;
+ if ((r = vorbis_synthesis (&fsv->vb, &op)) == 0)
vorbis_synthesis_blockin (&fsv->vd, &fsv->vb);
+
+ if (r == OV_EBADPACKET) {
+ return FISH_SOUND_ERR_GENERIC;
+ }
while ((samples = vorbis_synthesis_pcmout (&fsv->vd, &fsv->pcm)) > 0) {
vorbis_synthesis_read (&fsv->vd, samples);

0 comments on commit 2be07f5

Please sign in to comment.
Something went wrong with that request. Please try again.