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:
@@ -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)]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user