Merge "asoc: msm-lsm-client: check for param size before copying"

This commit is contained in:
QCTECMDR Service 2024-08-06 01:17:21 -07:00 • committed by Gerrit - the friendly Code Review server
commit f7d5c84156

View file

@ -830,6 +830,13 @@ static int msm_lsm_reg_model(struct snd_pcm_substream *substream,
q6lsm_sm_set_param_data(client, p_info, &offset, sm);
if ((sm->size - offset) < p_info->param_size) {
dev_err(rtd->dev, "%s: user buff size is greater than expected\n",
__func__);
rc = -EINVAL;
goto err_copy;
}
/*
* For set_param, advance the sound model data with the
* number of bytes required by param_data.