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

Commit e7ca214c authored by Harshal Ahire's avatar Harshal Ahire Committed by Gerrit - the friendly Code Review server
Browse files

dsp: Fix out of bound memory access.

Fix out of bound memory access in q6afe_load_avcs_modules()
for afe_avcs_payload_port_mapping structure.

Change-Id: Ibe0e90e4fbedc2cf6a88abd9f3845643020a904a
parent c702957f
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -359,8 +359,12 @@ static int q6afe_load_avcs_modules(int num_modules, u16 port_id,
		}

	}
	pr_err("%s: Not enough ports available\n", __func__);

	ret = -EINVAL;
	if (i == MAX_ALLOWED_USE_CASES) {
		pr_err("%s: Not enough ports available\n", __func__);
		return ret;
	}
fail:
	kfree(pm[i]->payload);
	pm[i]->payload = NULL;