Your message dated Sat, 11 Apr 2009 16:47:44 +0000
with message-id <[email protected]>
and subject line Bug#504308: fixed in toolame 02l-6lenny1
has caused the Debian Bug report #504308,
regarding toolame: WAV header read incorrectly on 64-bit platforms
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
504308: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=504308
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: toolame
Version: 02l-6
Severity: important
Tags: patch

When reading the sample frequency of the WAV header (a 32-bit
value), a pointer to an "unsigned long" is used on little-endian
platforms. Unfortunately, "unsigned long" is 64-bit on 64-bit platforms:

% file audio.wav
audio.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 
48000 Hz

% toolame -s 48 audio.wav
Parsing Wave File Header
>>> Unknown samp freq 824633720880000 Hz in Wave Header
>>> Default 44.1 kHz samp freq selected
>>> Input Wave File is Stereo
--------------------------------------------
Input File : 'audio.wav'   44.1 kHz
Output File: 'audio.mp2'
192 kbps MPEG-1 Layer II j-stereo Psy model 1 
[De-emph:Off    Copyright:No    Original:No     CRC:Off]
[Padding:Normal Byte-swap:Off   Chanswap:Off    DAB:Off]
ATH adjustment 0.000000
--------------------------------------------
(...)

(note that 824633720880000 & 0xFFFFFFFF == 48000)

I patched it using a uint32_t to be sure of the length:

% ./toolame-02l/toolame -s 48 audio.wav 
Parsing Wave File Header
>>> 48000 Hz sampling freq selected
>>> Input Wave File is Stereo
--------------------------------------------
Input File : 'audio.wav'   48.0 kHz
Output File: 'audio.mp2'
192 kbps MPEG-1 Layer II j-stereo Psy model 1 
[De-emph:Off    Copyright:No    Original:No     CRC:Off]
[Padding:Normal Byte-swap:Off   Chanswap:Off    DAB:Off]
ATH adjustment 0.000000
--------------------------------------------
(...)

Best regards,

-Christian

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

Kernel: Linux 2.6.26.5-mooch.1-amd64 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_US.UTF8)
Shell: /bin/sh linked to /bin/bash

Versions of packages toolame depends on:
ii  libc6                         2.7-15     GNU C Library: Shared libraries

toolame recommends no packages.

toolame suggests no packages.

-- no debconf information
diff -Nru toolame-02l.orig/audio_read.c toolame-02l/audio_read.c
--- toolame-02l.orig/audio_read.c	2008-11-02 19:01:25.000000000 +0100
+++ toolame-02l/audio_read.c	2008-11-02 19:09:57.000000000 +0100
@@ -1,6 +1,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdint.h>
 #include "common.h"
 #include "encoder.h"
 #include "options.h"
@@ -329,7 +330,7 @@
       }
     }
     if (NativeByteOrder == order_littleEndian) {
-      samplerate = *(unsigned long *) (&wave_header_buffer[24]);
+      samplerate = *(uint32_t *) (&wave_header_buffer[24]);
     } else {
       samplerate = wave_header_buffer[27] +
 	(wave_header_buffer[26] << 8) +

--- End Message ---
--- Begin Message ---
Source: toolame
Source-Version: 02l-6lenny1

We believe that the bug you reported is fixed in the latest version of
toolame, which is due to be installed in the Debian FTP archive:

toolame_02l-6lenny1.diff.gz
  to pool/main/t/toolame/toolame_02l-6lenny1.diff.gz
toolame_02l-6lenny1.dsc
  to pool/main/t/toolame/toolame_02l-6lenny1.dsc
toolame_02l-6lenny1_i386.deb
  to pool/main/t/toolame/toolame_02l-6lenny1_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Fabian Greffrath <[email protected]> (supplier of updated toolame 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Mon, 16 Mar 2009 14:35:12 +0100
Source: toolame
Binary: toolame
Architecture: source i386
Version: 02l-6lenny1
Distribution: stable
Urgency: low
Maintainer: Debian multimedia packages maintainers 
<[email protected]>
Changed-By: Fabian Greffrath <[email protected]>
Description: 
 toolame    - MPEG-1 layer 2 audio encoder
Closes: 504308 506193
Changes: 
 toolame (02l-6lenny1) stable; urgency=low
 .
   * debian/control:
     + Added Build-Depends on quilt.
     + Bumped Standards-Version to 3.8.0.
     + Removed the "XS-" prefix from the Vcs-Svn and Vcs-Browser fields.
     + Added Homepage field and removed it from the package description.
     + Fixed "binary-control-field-duplicates-source field".
   * debian/rules:
     + Included quilt for patch management.
     + Fixed "debian-rules-ignores-make-clean-error".
   * debian/patches/01-WAV-header-read-incorrectly-on-64-bit-platforms.patch:
     + New patch to fix usage of "unsigned long" on 64-bit little-endian
       platforms (Closes: #504308).
     + Thanks Christian Grigis <[email protected]>!
   * 
debian/patches/02-initialize-header-padding-field-before-parsing-arguments.patch:
     + New patch to initialize the 1-bit 'header->padding' field before parsing
       the arguments (Closes: #506193).
     + Thanks Christian Grigis <[email protected]>!
Checksums-Sha1: 
 85f319a7d22105d1829c5162aa80ca747023c4c2 1444 toolame_02l-6lenny1.dsc
 2a7f1dd2fa5e99e5ae9e4944e67ebfdf086a98e8 6118 toolame_02l-6lenny1.diff.gz
 213f1bf82787afb6f61f7f4fed54ebae0a71deb4 91862 toolame_02l-6lenny1_i386.deb
Checksums-Sha256: 
 d1e22b7170597bace4f803ed3fe2e56c1ab542ddecaf7f6a7f16dee7d1034e39 1444 
toolame_02l-6lenny1.dsc
 9f9d42298e2a74e2c2b1393993f1f6af5dc29381e216ebb25f989dd8fe907233 6118 
toolame_02l-6lenny1.diff.gz
 f0a37c99480c2dcd9b4a8d150d25ff68cdf80eeff480594013c601bf07844164 91862 
toolame_02l-6lenny1_i386.deb
Files: 
 cda80803b5d2583950eb130ea2d580e2 1444 sound optional toolame_02l-6lenny1.dsc
 180c63411cc1c9d7479d2dbf2d0fba37 6118 sound optional 
toolame_02l-6lenny1.diff.gz
 9001994b86898cc3e7fd0dfe1c0d1528 91862 sound optional 
toolame_02l-6lenny1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Debian Powered!

iJwEAQECAAYFAknAnKwACgkQ78RAoABp8o+chAP9FYCUk3R16yKLLJEpPohK9PKA
8f6c+7toChjQUr3ROx5PDLLJ91uz40/+x5Skf7/ZkMcIQfM7ZIxPl6I56P3BFQfA
Cn/Q3XE6p+Qwf6q3inLjNbTImFhQUJNFiw79WvHRdTtphh7DrFJX4iZMxHyFL1tr
GKZPvO/4uVcbz3hNLj4=
=urfT
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to