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 23:08:31 +0000 (16:08 -0700)
commit9cea6e1ab0be55708d4aacf62dd69f99c700b9ab
treeaa405209fa9da28566e4773026c3c01e3eb528f2
parent517ff99417cf9a27a6c4f34f99977505d9928785
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