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

Commit 345cb492 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: qdsp6v2: Add upper bounds check on index"

parents 14f725a1 2ef8a9aa
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -448,8 +448,9 @@ static void afe_send_cal_block(int32_t path, u16 port_id)
	}

	index = q6audio_get_port_index(port_id);
	if (index < 0) {
		pr_debug("%s: AFE port index invalid!\n", __func__);
	if (index < 0 || index > AFE_MAX_PORTS) {
		pr_debug("%s: AFE port index[%d] invalid!\n",
				__func__, index);
		goto done;
	}

@@ -665,8 +666,9 @@ static int afe_send_hw_delay(u16 port_id, u32 rate)
	}

	index = q6audio_get_port_index(port_id);
	if (index < 0) {
		pr_debug("%s: AFE port index invalid!\n", __func__);
	if (index < 0 || index > AFE_MAX_PORTS) {
		pr_debug("%s: AFE port index[%d] invalid!\n",
				__func__, index);
		goto fail_cmd;
	}