Srinivas Kandagatla 1ae54de79f ASoC: codecs: wcd934x: add a sanity check in set channel map
commit 3bb4852d598f0275ed5996a059df55be7318ac2f upstream.

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: a61f3b4f476e ("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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-25 09:04:07 +01:00
..
2021-03-25 09:04:04 +01:00
2021-03-25 09:04:04 +01:00
2018-02-27 10:41:34 +00:00
2020-01-07 22:29:38 +00:00
2020-10-15 11:07:44 -07:00
2018-04-26 12:44:15 +01:00
2020-03-23 18:17:22 +00:00
2019-06-12 13:52:26 +01:00
2020-10-15 11:07:44 -07:00
2020-01-10 13:31:49 +00:00
2020-10-15 11:07:44 -07:00
2020-01-09 21:22:36 +00:00
2020-10-15 11:07:44 -07:00
2020-09-10 12:49:44 +01:00
2020-05-07 13:18:04 +01:00
2020-05-07 13:18:04 +01:00
2020-10-15 11:07:44 -07:00
2019-07-26 13:10:09 +01:00
2020-10-15 11:07:44 -07:00
2018-05-18 11:20:11 +01:00
2018-06-01 12:05:30 +01:00
2020-07-20 15:34:29 +01:00
2020-10-02 21:05:29 +01:00
2020-05-04 19:23:59 +01:00
2020-05-26 10:55:37 +01:00