Public bug reported: 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 ** Affects: faad2 (Ubuntu) Importance: Undecided Status: New ** Tags: amd64 apport-bug maverick -- faad segfaults on amd64 due to incorrect pointer size https://bugs.launchpad.net/bugs/665802 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs