FROMGIT: ASoC: codecs: wcd934x: add a sanity check in set channel map
set channel map can be passed with a channel maps, however if the number of channels that are passed are more than the actual supported channels then we would be accessing array out of bounds. So add a sanity check to validate these numbers! Fixes: a61f3b4f ("ASoC: wcd934x: add support to wcd9340/wcd9341 codec") 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-4-srinivas.kandagatla@linaro.org Signed-off-by:
Mark Brown <broonie@kernel.org> Signed-off-by:
John Stultz <john.stultz@linaro.org> Change-Id: Id0edc2996db0c9ee4e3dba344e7624abfb00b05d (cherry picked from commit 480c25e7003d0222f64824d4c7afcd274bc66ebd https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next)
Loading
Please sign in to comment