← Back to team overview

touch-packages team mailing list archive

[Bug 665802] Re: faad segfaults on amd64 due to incorrect pointer size

 

lucid has seen the end of its life and is no longer receiving any
updates. Marking the lucid task for this ticket as "Won't Fix".

** Changed in: faad2 (Ubuntu Lucid)
       Status: New => Won't Fix

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to faad2 in Ubuntu.
https://bugs.launchpad.net/bugs/665802

Title:
  faad segfaults on amd64 due to incorrect pointer size

Status in faad2 package in Ubuntu:
  Fix Released
Status in faad2 source package in Lucid:
  Won't Fix
Status in faad2 package in Debian:
  Fix Released

Bug description:
  When I run faad on amd64 with the command line "faad -b 2 -f 2 -q -w
  AAC2AC3Temp.aac" (-b 2 indicating 24 bit output), I get a segmentation
  fault in fwrite. The same command on the same data works fine in a 32
  bit system.

  The problem is due to the write_audio_24bit() function in
  frontend/audio.c, which uses a long* pointer (ie which is 8 bytes on
  amd64 but only 4 on x86):

  static int write_audio_24bit(audio_file *aufile, void *sample_buffer,
                               unsigned int samples)
  {
      int ret;
      unsigned int i;
      long *sample_buffer24 = (long*)sample_buffer;
      char *data = malloc(samples*aufile->bits_per_sample*sizeof(char)/8);

  Changing the definition of sample_buffer24 to make it an int* fixes
  the problem.

  The function write_audio_32bit needs a similar change and stops the
  segfault happening if you use "-b 3" for 32 bit samples. (There is
  also similar code in aacDECdrop/audio.c but I'm not sure where that is
  used.)

  ProblemType: Bug
  DistroRelease: Ubuntu 10.10
  Package: faad 2.7-4
  Uname: Linux 2.6.36-iwlwifi-unify-scan x86_64
  NonfreeKernelModules: nvidia
  Architecture: amd64
  CheckboxSubmission: 1bd8e90541d49b96c13cbfcc9baf103b
  CheckboxSystem: d00f84de8a555815fa1c4660280da308
  Date: Sun Oct 24 15:21:17 2010
  InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Alpha amd64 (20100224.1)
  ProcEnviron:
   LANG=en_AU.utf8
   SHELL=/bin/bash
  SourcePackage: faad2

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/faad2/+bug/665802/+subscriptions