ASoC: max98095: a couple array underflows
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 13 Sep 2013 07:52:14 +0000 (10:52 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Oct 2013 21:51:07 +0000 (14:51 -0700)
commita7abc25bd4142a45bbcd90281a1869850a922876
tree24e179a90c4de71b7dff76068878733f459eb867
parent67a8bceeb8f58b365104b0b35285205bff488727
ASoC: max98095: a couple array underflows

commit f8d7b13e14357ed19d2ca2799539600418dc3939 upstream.

The ->put() function are called from snd_ctl_elem_write() with user
supplied data.  The limit checks here could underflow leading to a
crash.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/codecs/max98095.c