soxr
soxr copied to clipboard
Crash when realloc fails
Here: https://github.com/chirlu/soxr/blob/master/src/vr32.c#L390
It appears that
dest = fifo_reserve(&s->fifo, len);
can return 0 if a realloc fails, but then
if (stage_num < 0) for (; i < len; ++src)
dest[i++] = double_fir0(src), dest[i++] = double_fir1(src);
doesn't check if 0 was returned and then an access violation happens.
In case it helps anyone, the likely cause of this failing is two threads using the same soxr_t handle at the same time without a mutex