CMSIS-DSP: Prevent off-by-one access past end of y-data buffer in f32 linear interpolation

pull/19/head
Ryan Mullen 7 years ago committed by Christophe Favergeon
parent d3170304e1
commit a5b854594b

@ -5555,7 +5555,7 @@ __STATIC_FORCEINLINE void arm_inv_park_q31(
/* Iniatilize output for below specified range as least output value of table */
y = pYData[0];
}
else if ((uint32_t)i >= S->nValues)
else if ((uint32_t)i >= (S->nValues - 1))
{
/* Iniatilize output for above specified range as last output value of table */
y = pYData[S->nValues - 1];

Loading…
Cancel
Save