SWH/BodeShifterCV: fix out-of-bounds array access

The xcoeffs array only has 100 elements and thus accessing xcoeffs[100]
leads to undefined behaviour.
This commit is contained in:
Tobias Doerffel
2014-07-05 17:46:10 +02:00
parent b9d99c9c19
commit ab55b26e4b

View File

@@ -247,7 +247,7 @@ static void runBodeShifterCV(LADSPA_Handle instance, unsigned long sample_count)
/* Perform the Hilbert FIR convolution
* (probably FFT would be faster) */
hilb = 0.0f;
for (i = 0; i <= NZEROS/2; i++) {
for (i = 0; i < NZEROS/2; i++) {
hilb += (xcoeffs[i] * delay[(dptr - i*2) & (D_SIZE - 1)]);
}