First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 70387
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Sound Team <sound@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Tom Noonan <tnoonan@iastate.edu>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
faad2-2.0_long_opts.patch faad2-2.0_long_opts.patch patch Thomas Cort (RETIRED) 2006-01-15 09:30 0000 533 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 70387 depends on: Show dependency tree
Bug 70387 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2004-11-07 15:43 0000
faad2 --long-help option causes a segfault after the basic build / licence
information is printed.  Recompiling does not help.  Seems to run fine
otherwise.

Version faad2-2.0-r3

Reproducible: Always
Steps to Reproduce:
1.Execute faad --long-help
2.
3.

Actual Results:  
bash-2.05b$ faad --long-help
 *********** Ahead Software MPEG-4 AAC Decoder V2.0      ******************

 Build: Nov  7 2004
 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 as published by
 the Free Software Foundation; either version 2 of the License, or
 (at your option) any later version.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

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

Segmentation fault

------- Comment #1 From Matt Taylor 2004-11-07 19:39:30 0000 -------
It segfaults with any invalid arg.  faad --help works, faad --fakelongarg
crashes.  Also it doesn't crash on a default-linux/x86/gcc2 system.

------- Comment #2 From foser (RETIRED) 2004-11-09 06:54:46 0000 -------
probably some allocation issue

------- Comment #3 From Diego E. 'Flameeyes' Pettenò 2005-12-19 01:58:15 0000 -------
Taking over faad2 for sound herd.

------- Comment #4 From Diego E. 'Flameeyes' Pettenò 2005-12-19 03:27:07 0000 -------
(gdb) bt
#0  0x00002f942d3c3690 in strncmp () from /lib/libc.so.6
#1  0x0000000000404add in _getopt_internal (argc=2, argv=0x79c25322e408,
optstring=0x405ab3 "o:a:s:f:b:l:wgdhit",
    longopts=0x68, longind=0x79c25322e2f8, long_only=0) at getopt.c:468
#2  0x00000000004034b5 in main (argc=2, argv=0x79c25322e408) at main.c:1059
#3  0x00002f942d36f66c in __libc_start_main () from /lib/libc.so.6
#4  0x000000000040177a in _start ()

okay I have the trace, I'd like to mark this as UPSTREAM but upstream is
dead...
I'll see in the next days if I can find a patch in their last cvs version, as
their code is *really* messy.

------- Comment #5 From Thomas Cort (RETIRED) 2006-01-15 09:30:50 0000 -------
Created an attachment (id=77175) [edit]
faad2-2.0_long_opts.patch

This patch fixes the segfault by added a NULL option at the end of
long_options. From the getopt.3 manpage: "The last element of the [struct
option] array has to be filled with zeroes."

------- Comment #6 From Diego E. 'Flameeyes' Pettenò 2006-01-15 09:54:23 0000 -------
Thanks Thomas, patch applied in -r10.

First Last Prev Next    No search results available      Search page      Enter new bug