Skip to content
Unverified Commit 4c907bcd authored by Dan Carpenter's avatar Dan Carpenter Committed by Mark Brown
Browse files

ASoC: max9759: fix underflow in speaker_gain_control_put()

Check for negative values of "priv->gain" to prevent an out of bounds
access.  The concern is that these might come from the user via:
  -> snd_ctl_elem_write_user()
    -> snd_ctl_elem_write()
      -> kctl->put()

Fixes: fa8d9151

 ("ASoC: max9759: Add Amplifier Driver")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20220119123101.GA9509@kili


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent f7a6021a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment