diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-09-13 03:52:14 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-09-13 13:33:18 -0400 |
commit | f8d7b13e14357ed19d2ca2799539600418dc3939 (patch) | |
tree | b6f30ee8113bddf7e287cabb9aa9fb68443d25b4 | |
parent | 5df498a27ab385294fdb7cad19c623d4da94a780 (diff) |
ASoC: max98095: a couple array underflows
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>
Cc: stable@vger.kernel.org
-rw-r--r-- | sound/soc/codecs/max98095.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/max98095.c b/sound/soc/codecs/max98095.c index 41cdd1642970..8dbcacd44e6a 100644 --- a/sound/soc/codecs/max98095.c +++ b/sound/soc/codecs/max98095.c | |||
@@ -1863,7 +1863,7 @@ static int max98095_put_eq_enum(struct snd_kcontrol *kcontrol, | |||
1863 | struct max98095_pdata *pdata = max98095->pdata; | 1863 | struct max98095_pdata *pdata = max98095->pdata; |
1864 | int channel = max98095_get_eq_channel(kcontrol->id.name); | 1864 | int channel = max98095_get_eq_channel(kcontrol->id.name); |
1865 | struct max98095_cdata *cdata; | 1865 | struct max98095_cdata *cdata; |
1866 | int sel = ucontrol->value.integer.value[0]; | 1866 | unsigned int sel = ucontrol->value.integer.value[0]; |
1867 | struct max98095_eq_cfg *coef_set; | 1867 | struct max98095_eq_cfg *coef_set; |
1868 | int fs, best, best_val, i; | 1868 | int fs, best, best_val, i; |
1869 | int regmask, regsave; | 1869 | int regmask, regsave; |
@@ -2016,7 +2016,7 @@ static int max98095_put_bq_enum(struct snd_kcontrol *kcontrol, | |||
2016 | struct max98095_pdata *pdata = max98095->pdata; | 2016 | struct max98095_pdata *pdata = max98095->pdata; |
2017 | int channel = max98095_get_bq_channel(codec, kcontrol->id.name); | 2017 | int channel = max98095_get_bq_channel(codec, kcontrol->id.name); |
2018 | struct max98095_cdata *cdata; | 2018 | struct max98095_cdata *cdata; |
2019 | int sel = ucontrol->value.integer.value[0]; | 2019 | unsigned int sel = ucontrol->value.integer.value[0]; |
2020 | struct max98095_biquad_cfg *coef_set; | 2020 | struct max98095_biquad_cfg *coef_set; |
2021 | int fs, best, best_val, i; | 2021 | int fs, best, best_val, i; |
2022 | int regmask, regsave; | 2022 | int regmask, regsave; |