diff options
author | Marek Vasut <marex@denx.de> | 2022-02-15 14:06:45 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-03-08 19:07:46 +0100 |
commit | f3537f1b2bfd3b1df15723df49fc26eccd5112fe (patch) | |
tree | dd48e727a25d2c44e40b583173621c8513870aa4 /sound/soc/soc-topology.c | |
parent | 75a471401b1097bf8f53f88fa2fd4482ac57e70f (diff) |
ASoC: ops: Shift tested values in snd_soc_put_volsw() by +min
commit 9bdd10d57a8807dba0003af0325191f3cec0f11c upstream.
While the $val/$val2 values passed in from userspace are always >= 0
integers, the limits of the control can be signed integers and the $min
can be non-zero and less than zero. To correctly validate $val/$val2
against platform_max, add the $min offset to val first.
Fixes: 817f7c9335ec0 ("ASoC: ops: Reject out of bounds values in snd_soc_put_volsw()")
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20220215130645.164025-1-marex@denx.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/soc/soc-topology.c')
0 files changed, 0 insertions, 0 deletions