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

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

Merge "ASoC: msm-pcm-host-voice: Address buffer overflow in hpcm capture copy"

parents 3742f710 7756692d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -690,6 +690,12 @@ static void hpcm_copy_capture_data_to_queue(struct dai_data *dai_data,
	if (dai_data->substream == NULL)
		return;

	if (len >= HPCM_MAX_VOC_PKT_SIZE) {
		pr_err("%s: Copy capture data len %d is > HPCM_MAX_VOC_PKT_SIZE\n",
			__func__, len);
		return;
	}

	/* Copy out buffer packet into free_queue */
	spin_lock_irqsave(&dai_data->dsp_lock, dsp_flags);