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

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

Merge "msm: smd: change bounds check on smd edges"

parents 045f23a5 5f4e7588
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3325,7 +3325,7 @@ int smd_edge_to_remote_pid(uint32_t edge)
 */
void smd_set_edge_subsys_name(uint32_t edge, const char *subsys_name)
{
	if (edge <= ARRAY_SIZE(edge_to_pids))
	if (edge < ARRAY_SIZE(edge_to_pids))
		strlcpy(edge_to_pids[edge].subsys_name,
			subsys_name, SMD_MAX_CH_NAME_LEN);
	else
@@ -3355,7 +3355,7 @@ void smd_reset_all_edge_subsys_name(void)
 */
void smd_set_edge_initialized(uint32_t edge)
{
	if (edge <= ARRAY_SIZE(edge_to_pids))
	if (edge < ARRAY_SIZE(edge_to_pids))
		edge_to_pids[edge].initialized = true;
	else
		pr_err("%s: Invalid edge type[%d]\n", __func__, edge);