Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 38973a89 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "asoc: check param_size before use it in memcpy"

parents 1b53e55f e1e34edd
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -881,8 +881,16 @@ static int msm_lsm_dereg_model(struct snd_pcm_substream *substream,
		}

		if (sm->model_id == p_info->model_id) {
			if (p_info->param_size != sizeof(p_info->model_id)) {
				rc = -EINVAL;
				pr_err("%s: %s failed, p_info->param_size is invalid: %d\n",
				       __func__,  "LSM_DEREG_MULTI_SND_MODEL",
				       p_info->param_size);
			} else {
				rc = q6lsm_set_one_param(client, p_info, NULL,
							 LSM_DEREG_MULTI_SND_MODEL);
			}

			if (rc)
				dev_err(rtd->dev,
					"%s: Failed to deregister snd_model %d, err = %d\n",