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

Commit 92a41a28 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoc: msm: fix out of bounds array access"

parents 57fdba1a 5feda7e4
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -85,6 +85,13 @@ void audio_in_get_dsp_frames(void *priv,
	pr_debug("%s:session id %d: enc_framesotal_size=0x%8x\n", __func__,
			audio->ac->session, payload[4]);

	/* Ensure the index is within max array size: FRAME_NUM */
	if (index >= FRAME_NUM) {
		pr_err("%s: Invalid index %d\n",
			__func__, index);
		return;
	}

	audio->out_frame_info[index][0] = payload[9];
	audio->out_frame_info[index][1] = payload[5];