From ee318548d765e0e0b28e35fea897b59fd28c6de2 Mon Sep 17 00:00:00 2001 From: Damian Nikodem Date: Wed, 7 Jun 2023 09:49:37 +0200 Subject: [PATCH] aria: data size calculation fix This change fixes data size calculation to be copied to aria cyclic buffer. Signed-off-by: Damian Nikodem --- src/audio/aria/aria.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/audio/aria/aria.c b/src/audio/aria/aria.c index 30b710e68..b49856aa7 100644 --- a/src/audio/aria/aria.c +++ b/src/audio/aria/aria.c @@ -82,7 +82,7 @@ int aria_algo_buffer_data(struct comp_dev *dev, int32_t *__restrict data, size_t size_t min_buff = MIN(cd->buff_size - cd->buff_pos - cd->offset, size); int ret; - ret = memcpy_s(&cd->data[cd->buff_pos], cd->buff_size * sizeof(int32_t), + ret = memcpy_s(&cd->data[cd->buff_pos], (cd->buff_size - cd->buff_pos) * sizeof(int32_t), data, min_buff * sizeof(int32_t)); if (ret < 0) return ret;