[pulseaudio-discuss] [PATCH] resampler: Make sure that there are no overflows when multiplying potentially big numbers.

Tanu Kaskinen tanu.kaskinen at jollamobile.com
Tue Oct 30 03:06:43 PDT 2012


On Tue, 2012-10-30 at 08:47 +0530, Arun Raghavan wrote:
> On Mon, 2012-07-09 at 10:07 +0300, Tanu Kaskinen wrote:
> > This fixes at least one crash that has been observed. The
> > multiplication in trivial_resample() overflowed when
> > resampling from 96 kHz to 48 kHz, causing an assertion
> > error:
> > 
> > Assertion 'o_index * fz < pa_memblock_get_length(output->memblock)' failed at pulsecore/resampler.c:1521, function trivial_resample(). Aborting.
> > 
> > Without the assertion, the memcpy() after the assertion
> > would have overwritten some random heap memory.
> > ---
> 
> Looks good, please go ahead and push this.

Are you applying the patches when reviewing? If so, I think it's ok to
push them too if they look good, if the git checkout is ready for
pushing anyway. I'm just thinking that there is one redundant step with
the "go ahead and push this" process :)

-- 
Tanu



More information about the pulseaudio-discuss mailing list