UPSTREAM: ASoC: ops: Shift tested values in snd_soc_put_volsw() by +min
commit 9bdd10d5 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. Bug: 237115073 Bug: 237071650 Fixes: 817f7c93 ("ASoC: ops: Reject out of bounds values in snd_soc_put_volsw()") Change-Id: Id05b088a53dff662481e15e35ba1992492620196 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>
Loading
Please register or sign in to comment