Encoding ECLIPSE, from Dark Side Of The Moon by Pink Floyd,
with actual CVS version results in a segmentation fault
after 96% done. All other eight songs encode fine.
It happens at the following code within best_huffman_divide (takehiro.c)
/* Determines the number of bits to encode the quadruples. */
i = (cod_info.count1 += 2);
a1 = a2 = 0;
for (; i > cod_info.big_values; i -= 4) {
int p = ((ix[i-4] * 2 + ix[i-3]) * 2 + ix[i-2]) * 2 + ix[i-1];
--> a1 += ht[32].hlen[p]; <--
a2 += ht[33].hlen[p];
}
cod_info.big_values = i;
cod_info.count1 has a value of 576 and gets increased by two.
So i starts with 578, resulting in an index overflow ix[577],
generating trash for p, crashing LAME at the marked position.
Robert
--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )