[Icecast] ices-0.4 coredumps

Brendan Cully brendan at xiph.org
Mon Apr 18 06:56:18 UTC 2005


On Sunday, 17 April 2005 at 20:59, bedlam wrote:
> src/stream.c declares two vars
>   static int16_t left[INPUT_BUFSIZ * 45];
>   static int16_t right[INPUT_BUFSIZ * 45];
> 
> I found some mp3 that return more than INPUT_BUFSIZ * 45 samples and
> cause ices to coredump, exept if a test is made on stream.c:{209,
> 211}.
> 
> stream.c:209:
> if (decode)
>     if ((samples = ices_reencode_decode (ibuf, len, sizeof (left),
> left, right)) > INPUT_BUFSIZ * 45) {
>         len = sample = INPUT_BUFSIZ * 45;
>      }
> 
> stream.c:211:
> if ((len = samples = source->readpcm (source, sizeof (left), left,
> right)) >  INPUT_BUFSIZ * 45) {
> len = sample = INPUT_BUFSIZ * 45;
> }

Interesting, I guess my math must have been faulty. What are the specs
(sample rate, bit rate, etc - whatever ices0 says about it in verbose
mode) of this mp3? I'd rather have the correct upper bound than clip
samples...



More information about the Icecast mailing list