[xiph-commits] r3901 - libfishsound/trunk/src/libfishsound

conrad at svn.annodex.net conrad at svn.annodex.net
Sat Mar 28 01:05:41 PDT 2009


Author: conrad
Date: 2009-03-28 01:05:41 -0700 (Sat, 28 Mar 2009)
New Revision: 3901

Modified:
   libfishsound/trunk/src/libfishsound/vorbis.c
Log:
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.

Modified: libfishsound/trunk/src/libfishsound/vorbis.c
===================================================================
--- libfishsound/trunk/src/libfishsound/vorbis.c	2009-03-28 07:44:32 UTC (rev 3900)
+++ libfishsound/trunk/src/libfishsound/vorbis.c	2009-03-28 08:05:41 UTC (rev 3901)
@@ -433,6 +433,8 @@
   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;



More information about the commits mailing list