Package: gjay Version: 0.2.8.3-4.1 Severity: important Tags: patch It turns out that on AMD64, gjay's analysis quietly just fails on every file without anything being reported to the user. The reason is that the parsing of the temporary wav file header is broken for the age-old reason: unwarranted assumptions about the sizes of C types.
Attached is a simple patch that seems to fix things. However, the very fact that the program has been written by someone who parses file formats like this: fread(&wsfile.header, sizeof(waveheaderstruct), 1, f); (i.e. making stupendously specific assumptions about the platform and the compiler's struct representations) means that the correct functioning of the entire program under 64-bit platforms is suspect, and the code should probably be thoroughly reviewed for any and all other platform-specific assumptions that get broken under amd64. -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (500, 'unstable') Architecture: amd64 (x86_64) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.16la2 Locale: LANG=C, LC_CTYPE=fi_FI.UTF-8 (charmap=UTF-8) Versions of packages gjay depends on: ii libatk1.0-0 1.10.3-1 The ATK accessibility toolkit ii libc6 2.3.6-3 GNU C Library: Shared libraries an ii libcairo2 1.0.2-3 The Cairo 2D vector graphics libra ii libfontconfig1 2.3.2-2 generic font configuration library ii libglib2.0-0 2.10.1-2 The GLib library of C routines ii libgsl0 1.7.90-1 GNU Scientific Library (GSL) -- li ii libgtk2.0-0 2.8.13-1 The GTK+ graphical user interface ii libpango1.0-0 1.12.0-2 Layout and rendering of internatio ii libx11-6 6.8.2.dfsg.1-11 X Window System protocol client li ii libxcursor1 1.1.3-1 X cursor management library ii libxext6 6.8.2.dfsg.1-11 X Window System miscellaneous exte ii libxi6 6.8.2.dfsg.1-11 X Window System Input extension li ii libxinerama1 6.8.2.dfsg.1-11 X Window System multi-head display ii libxrandr2 6.8.2.dfsg.1-11 X Window System Resize, Rotate and ii libxrender1 1:0.9.0.2-1 X Rendering Extension client libra ii mp3info 0.8.4-8 An MP3 technical info viewer and I ii mpg321 [mpg123] 0.2.10.3 A Free command-line mp3 player, co ii xmms 1.2.10+cvs20050809-5 Versatile X audio player gjay recommends no packages. -- no debconf information
--- analysis.h.orig 2006-04-06 11:31:29.000000000 +0300 +++ analysis.h 2006-04-06 11:22:11.000000000 +0300 @@ -56,19 +56,19 @@ /* WAV file header */ typedef struct { - char main_chunk[4]; /* 'RIFF' */ - unsigned long length; /* length of file */ - char chunk_type[4]; /* 'WAVE' */ - char sub_chunk[4]; /* 'fmt' */ - unsigned long length_chunk; /* length sub_chunk, always 16 bytes */ - unsigned short format; /* always 1 = PCM-Code */ - unsigned short modus; /* 1 = Mono, 2 = Stereo */ - unsigned long sample_fq; /* Sample Freq */ - unsigned long byte_p_sec; /* Data per sec */ - unsigned short byte_p_spl; /* Bytes per sample */ - unsigned short bit_p_spl; /* bits per sample, 8, 12, 16 */ - char data_chunk[4]; /* 'data' */ - unsigned long data_length; /* length of data */ + gchar main_chunk[4]; /* 'RIFF' */ + guint32 length; /* length of file */ + gchar chunk_type[4]; /* 'WAVE' */ + gchar sub_chunk[4]; /* 'fmt' */ + guint32 length_chunk; /* length sub_chunk, always 16 bytes */ + guint16 format; /* always 1 = PCM-Code */ + guint16 modus; /* 1 = Mono, 2 = Stereo */ + guint32 sample_fq; /* Sample Freq */ + guint32 byte_p_sec; /* Data per sec */ + guint16 byte_p_spl; /* Bytes per sample */ + guint16 bit_p_spl; /* bits per sample, 8, 12, 16 */ + gchar data_chunk[4]; /* 'data' */ + guint32 data_length; /* length of data */ } waveheaderstruct; /* Analysis.c */