Commit e98a058c authored by conrad's avatar conrad
Browse files

Initialize vorbis_dsp_state to avoid a crash triggered by a Vorbis file

with corrupt headers Mozilla bug 481601.

Adapted from a patch that fixes the crash by adding a new vorbis_dsp_init()
function to libvorbis, and calling that from fs_vorbis_init():
https://bug481601.bugzilla.mozilla.org/attachment.cgi?id=366150

It was suggested in this thread on vorbis-dev that we isolate the patch
to libfishsound, rather than also adding vorbis_dsp_init() to libvorbis:
http://lists.xiph.org/pipermail/vorbis-dev/2009-March/019791.html

Hence, this revision should replace the patch currently in use in
Firefox for Mozilla bug 481601.

git-svn-id: http://svn.annodex.net/libfishsound/trunk@3901 8158c8cd-e7e1-0310-9fa4-c5954c97daef
parent 7051bfe5
......@@ -433,6 +433,8 @@ fs_vorbis_init (FishSound * fsound)
fsv->finished = 0;
vorbis_info_init (&fsv->vi);
vorbis_comment_init (&fsv->vc);
memset(&fsv->vd, 0, sizeof(fsv->vd));
vorbis_block_init (&fsv->vd, &fsv->vb);
fsv->pcm = NULL;
fsv->ipcm = NULL;
fsv->max_pcm = 0;
......
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