Package: gjay
Version: 0.3.1-2
Severity: important
Tags: patch

gjay only Suggests: vorbis-tools.  but when ogg123 is not in the path,
gjay dies with a segfault when trying to decode an ogg file:

0 d...@pip:~$ gjay --analyze-standalone foo.ogg
Segmentation fault
139 d...@pip:~$

The attached patch should avoid the segmentation fault (though it
makes it terminate immediately with return code 0, printing no error
messages unless you set the verbose flag, so i am not sure if it's all
that much better).

Regards,

        --dkg

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing'), (200, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.36-rc6-686 (SMP w/1 CPU core)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages gjay depends on:
ii  audacious              2.3-2             small and fast audio player which 
ii  libatk1.0-0            1.30.0-1          The ATK accessibility toolkit
ii  libaudclient2          2.3-2             audacious dbus remote control libr
ii  libc6                  2.11.2-6+squeeze1 Embedded GNU C Library: Shared lib
ii  libcairo2              1.8.10-6          The Cairo 2D vector graphics libra
ii  libdbus-1-3            1.2.24-3          simple interprocess messaging syst
ii  libdbus-glib-1-2       0.88-2            simple interprocess messaging syst
ii  libfontconfig1         2.8.0-2.1         generic font configuration library
ii  libfreetype6           2.4.2-1           FreeType 2 font engine, shared lib
ii  libglib2.0-0           2.24.2-1          The GLib library of C routines
ii  libgsl0ldbl            1.14+dfsg-1       GNU Scientific Library (GSL) -- li
ii  libgtk2.0-0            2.20.1-2          The GTK+ graphical user interface 
ii  libpango1.0-0          1.28.1-1          Layout and rendering of internatio
ii  mpg321 [mpg123]        0.2.12-1          Simple and lighweight command line

gjay recommends no packages.

Versions of packages gjay suggests:
pn  vorbis-tools                  <none>     (no description available)

-- no debconf information
--- a/analysis.c        2010-10-27 15:38:37.000000000 -0400
+++ b/analysis.c        2010-10-27 15:39:58.000000000 -0400
@@ -379,6 +379,12 @@
     send_ipc_text(daemon_pipe_fd, ANIMATE_START, analyze_song->path);
 
     f = inflate_to_wav(fname, type);
+    if (f == NULL) {
+        if (verbosity)
+          g_warning(_("Failed to decompress '%s'.\n"),fname);
+        in_analysis = FALSE;
+        return;
+    }      
     memset(&wsfile, 0x00, sizeof(wav_file));
     wsfile.f = f;
     fread(&wsfile.header, sizeof(waveheaderstruct), 1, f);

Reply via email to