From a5b854594bd5f05a80e6673beb864db1b39eb72a Mon Sep 17 00:00:00 2001 From: Ryan Mullen Date: Thu, 18 Jul 2019 15:04:43 -0400 Subject: [PATCH] CMSIS-DSP: Prevent off-by-one access past end of y-data buffer in f32 linear interpolation --- Include/arm_math.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Include/arm_math.h b/Include/arm_math.h index 93e13350..bea2ac6e 100644 --- a/Include/arm_math.h +++ b/Include/arm_math.h @@ -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];