aria: data size calculation fix

This change fixes data size calculation to be copied
to aria cyclic buffer.

Signed-off-by: Damian Nikodem <damian.nikodem@intel.com>
This commit is contained in:
Damian Nikodem 2023-06-07 09:49:37 +02:00 committed by Kai Vehmanen
parent 212e9808a4
commit ee318548d7
1 changed files with 1 additions and 1 deletions

View File

@ -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); size_t min_buff = MIN(cd->buff_size - cd->buff_pos - cd->offset, size);
int ret; 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)); data, min_buff * sizeof(int32_t));
if (ret < 0) if (ret < 0)
return ret; return ret;