Package: libfishsound1
Version: 0.9.2-1
Severity: wishlist
Tags: patch

I'm only filing as wishlist as xulrunner depending on libfishsound1 isn't
in the archive yet and won't be for a little time, though this is a crasher
bug fixer.

Please read https://bugzilla.mozilla.org/show_bug.cgi?id=487519#c44 for a
rationale about the attached patch.


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.30-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
diff --git a/media/libfishsound/src/libfishsound/fishsound_vorbis.c b/media/libfishsound/src/libfishsound/fishsound_vorbis.c
index 68bdb3a..236dda4 100644
--- a/media/libfishsound/src/libfishsound/fishsound_vorbis.c
+++ b/media/libfishsound/src/libfishsound/fishsound_vorbis.c
@@ -154,9 +154,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);

Reply via email to