Skip to content
Snippets Groups Projects
Commit d14e9da5 authored by Walter Yang's avatar Walter Yang Committed by Nick Desaulniers
Browse files

ASoC: Add backend user count checking


Add backend user count checking to protect the index
boundary.

Bug: 33751424
Change-Id: Ic1b61d1f7130252cc54da0b16553858714988dbd
CRs-Fixed: 2009216
Signed-off-by: default avatarWalter Yang <yandongy@codeaurora.org>
Signed-off-by: default avatarSiqi Lin <siqilin@google.com>
parent c6d874fd
Branches
Tags
No related merge requests found
......@@ -531,6 +531,11 @@ static int soc_compr_set_params_fe(struct snd_compr_stream *cstream,
cstream, &async_domain);
} else {
be_list[j++] = be;
if (j == DPCM_MAX_BE_USERS) {
dev_dbg(fe->dev,
"ASoC: MAX backend users!\n");
break;
}
}
}
for (i = 0; i < j; i++) {
......
......
......@@ -2320,6 +2320,10 @@ void dpcm_be_dai_prepare_async(struct snd_soc_pcm_runtime *fe, int stream,
dpcm, domain);
} else {
dpcm_async[i++] = dpcm;
if (i == DPCM_MAX_BE_USERS) {
dev_dbg(fe->dev, "ASoC: MAX backend users!\n");
break;
}
}
}
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment