oggenc segfaults on some .wav files
Have found several .wav's that oggenc will core dump on. Platform is
Solaris 8 on UltraSparc running in 64-bit mode (compiling as 32-bit).
Example file: http://www.nnaf.net/~jdd/oggenc_core.wav
That file contains the first 10 seconds or so (1 mb) of Ozzy Osbourne's
Mr. Tinkertrain.
Here is the stack trace:
(gdb) set args -o blah.ogg /tmp/oggenc_core.wav
(gdb) run
Program received signal SIGSEGV, Segmentation fault.
0xff24b7b4 in apsort (a=0xffbeef4c, b=0xffbeef54) at psy.c:953
953 if(fabs(**(float **)a)>fabs(**(float **)b))return -1;
(gdb) where
#0 0xff24b7b4 in apsort (a=0xffbeef4c, b=0xffbeef54) at psy.c:953
#1 0xff14b24c in qsort () from /usr/lib/libc.so.1
#2 0xff24bc6c in _vp_noise_normalize_sort (p=0x59708, magnitudes=0x93fe0,
sortedindex=0xffbef010) at psy.c:994
#3 0xff259220 in mapping0_forward (vb=0xffbef478) at mapping0.c:532
#4 0xff244068 in vorbis_analysis (vb=0xffbef478, op=0x0) at analysis.c:47
#5 0x1877c in oe_encode (opt=0xffbef7c0) at encode.c:283
#6 0x131e0 in main (argc=4, argv=0xffbef93c) at oggenc.c:337