changeset 283:d9e3f3e293ac

etm_audio.c: fix off-by-one error in auw of FIR coefficients The implementation of auw operation for UL or DL FIR upload had this bug: the number of 16-bit shortwords copied into the RVF-allocated temporary buffer was one too many, causing memory corruption errors. The present change fixes this bug.
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 08 Nov 2021 02:54:04 +0000
parents 231bceb7d95c
children bba917c3b510
files src/cs/services/etm/etm_audio.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/cs/services/etm/etm_audio.c	Fri Sep 24 03:23:55 2021 +0000
+++ b/src/cs/services/etm/etm_audio.c	Mon Nov 08 02:54:04 2021 +0000
@@ -224,7 +224,7 @@
 
         parameter = etm_malloc (sizeof(T_AUDIO_FIR_COEF));
         // Write coeffient values
-        for (i=0; i <= (sizeof(T_AUDIO_FIR_COEF)/2); i++) {
+        for (i=0; i < (sizeof(T_AUDIO_FIR_COEF)/2); i++) {
             ((T_AUDIO_FIR_COEF *) parameter)->coefficient[i]  = etm_get16(buf);  buf += 2;
         }
         audio.data = parameter;