vorbiscomment gives a SIGSEGV (segmentation fault) with --tag
I expected --tag to work exactly like -t. Instead, it causes a segfault whenever it appears in the command line.
[from SVN checkout of R15399]
~/src/vorbis-tools/vorbiscomment$ ./vorbiscomment --version
vorbiscomment from vorbis-tools 1.3.0
~/src/vorbis-tools/vorbiscomment$ ./vorbiscomment --tag
Segmentation fault
~/src/vorbis-tools/vorbiscomment$ ./vorbiscomment -t
./vorbiscomment: option requires an argument -- t
vorbiscomment from vorbis-tools 1.3.0
by the Xiph.Org Foundation (http://www.xiph.org/)
<snip usage>
I realize it's incorrect to call --tag with no arguments, but the bug manifests with or without an argument. It appears to be somewhere in the option parsing:
~/src/vorbis-tools/vorbiscomment$ gdb ./vorbiscomment
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"...
(gdb) run --tag
Starting program: /home/jason/src/vorbis-tools/vorbiscomment/vorbiscomment --tag
Program received signal SIGSEGV, Segmentation fault.
0x00007f033f96e050 in strlen () from /lib/libc.so.6
(gdb) bt
#0 0x00007f033f96e050 in strlen () from /lib/libc.so.6
#1 0x00007f033f96dd86 in strdup () from /lib/libc.so.6
#2 0x00000000004038c4 in parse_options (argc=2, argv=0x7fff48512aa8, param=0x22c0050) at vcomment.c:524
#3 0x0000000000403dd6 in main (argc=2, argv=0x7fff48512aa8) at vcomment.c:176
(gdb)
I was able to reproduce this bug with trunk (revision 15399) and 1.2.0. This is on amd64 box running debian testing.