Commit 2be07f5c authored by conrad's avatar conrad
Browse files

Debian #534744, Mozilla #487519

Fixes crash in vorbis_synthesis: reject bad header packets
parent 20b5cdf6
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment