Fixed out-of-bounds access in SB16/AWE32 DSP filter.
This commit is contained in:
parent
4cc15d9b7e
commit
96deba1ffa
1 changed files with 1 additions and 1 deletions
|
|
@ -361,7 +361,7 @@ static inline float low_fir_sb16(int i, float NewSample)
|
||||||
//Calculate the new output
|
//Calculate the new output
|
||||||
x[i][pos] = NewSample;
|
x[i][pos] = NewSample;
|
||||||
|
|
||||||
for (n = 0; n < ((SB16_NCoef+1)-pos); n++)
|
for (n = 0; n < ((SB16_NCoef+1)-pos) && n < SB16_NCoef; n++)
|
||||||
out += low_fir_sb16_coef[n] * x[i][n+pos];
|
out += low_fir_sb16_coef[n] * x[i][n+pos];
|
||||||
for (; n < SB16_NCoef; n++)
|
for (; n < SB16_NCoef; n++)
|
||||||
out += low_fir_sb16_coef[n] * x[i][(n+pos) - (SB16_NCoef+1)];
|
out += low_fir_sb16_coef[n] * x[i][(n+pos) - (SB16_NCoef+1)];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue