Bug#603807: faad segfaults on amd64 due to incorrect pointer size

Alessio Treglia alessio at debian.org
Wed Nov 17 14:16:44 UTC 2010


Package: faad
Version: 2.7-4
Severity: serious
Tags: patch sid squeeze upstream

This bug was reported on Ubuntu [1] and it affects Debian Squeeze too.
I've tried to reproduce it and here is the result:

alessio at alessio-laptop:~$ faad -b 2 -f 2 -w sample.aac 
 *********** Ahead Software MPEG-4 AAC Decoder V2.7 ******************

 Build: Oct 26 2009
 Copyright 2002-2004: Ahead Software AG
 http://www.audiocoding.com
 Floating point version

 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License.

 **************************************************************************

sample.aac file info:
ADTS, 4.608 sec, 13 kbps, 16000 Hz

  ---------------------
 | Config:  2 Ch       |
  ---------------------
 | Ch |    Position    |
  ---------------------
 | 00 | Left front     |
 | 01 | Right front    |
  ---------------------

Segmentation fault.aac.


A patch to fix this is available on Launchpad, I'm attaching it here:

--- frontend/audio.c.orig	2010-10-24 15:36:19.673485313 +0800
+++ frontend/audio.c	2010-10-24 15:36:43.323775214 +0800
@@ -347,7 +347,7 @@
 {
     int ret;
     unsigned int i;
-    long *sample_buffer24 = (long*)sample_buffer;
+    int *sample_buffer24 = (int*)sample_buffer;
     char *data = malloc(samples*aufile->bits_per_sample*sizeof(char)/8);
 
     aufile->total_samples += samples;
@@ -391,7 +391,7 @@
 {
     int ret;
     unsigned int i;
-    long *sample_buffer32 = (long*)sample_buffer;
+    int *sample_buffer32 = (int*)sample_buffer;
     char *data = malloc(samples*aufile->bits_per_sample*sizeof(char)/8);
 
     aufile->total_samples += samples;


[1] https://launchpad.net/bugs/665802

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

Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=it_IT.utf8, LC_CTYPE=it_IT.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages faad depends on:
ii  libc6                         2.11.2-7   Embedded GNU C Library: Shared lib
ii  libfaad2                      2.7-4      freeware Advanced Audio Decoder - 

faad recommends no packages.

faad suggests no packages.

-- no debconf information





More information about the pkg-multimedia-maintainers mailing list