Skip to content
Snippets Groups Projects
Commit e32cd272 authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

Avoids reading beyond the current buffer in comb_filter()

This could cause overflows when processing non-saturated TDAC values.
parent cbceaa85
No related branches found
No related tags found
No related merge requests found
......@@ -207,6 +207,10 @@ void comb_filter(opus_val32 *y, opus_val32 *x, int T0, int T1, int N,
OPUS_MOVE(y, x, N);
return;
}
/* When the gain is zero, T0 and/or T1 is set to zero. We need
to have then be at least 2 to avoid processing garbage data. */
T0 = IMAX(T0, COMBFILTER_MINPERIOD);
T1 = IMAX(T1, COMBFILTER_MINPERIOD);
g00 = MULT16_16_P15(g0, gains[tapset0][0]);
g01 = MULT16_16_P15(g0, gains[tapset0][1]);
g02 = MULT16_16_P15(g0, gains[tapset0][2]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment