]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: qcom: sdm845: Fix array out of bounds access
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tue, 9 Mar 2021 14:21:27 +0000 (14:21 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 10 Mar 2021 12:51:09 +0000 (12:51 +0000)
commita545f292ff73f0b3f19785fcd7ef4529b15d6e29
treeaa5159666d0e38769ecb6819fe695bce856b2856
parentb0a3281d716697d75f815585c3923e05f71f25ab
ASoC: qcom: sdm845: Fix array out of bounds access

Static analysis Coverity had detected a potential array out-of-bounds
write issue due to the fact that MAX AFE port Id was set to 16 instead
of using AFE_PORT_MAX macro.

Fix this by properly using AFE_PORT_MAX macro.

Fixes: d9837658b2c4 ("ASoC: qcom: sdm845: handle soundwire stream")
Reported-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210309142129.14182-2-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/qcom/sdm845.c