diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2015-10-15 10:01:42 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-10-15 10:00:29 +0200 |
commit | 5a1f8c42259a424cfd262185da872764dcc673ad (patch) | |
tree | fcb3b81c5f0a7b0fc3702c720069384e2326c68d /sound/core | |
parent | ab30965d9bfcd04931f9b70d00faa2ea614835a8 (diff) | |
download | op-kernel-dev-5a1f8c42259a424cfd262185da872764dcc673ad.zip op-kernel-dev-5a1f8c42259a424cfd262185da872764dcc673ad.tar.gz |
ALSA: oss: underflow in snd_mixer_oss_proc_write()
We cap the upper bound of "idx" but not the negative side. Let's make
it unsigned to fix this.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/oss/mixer_oss.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c index a99f720..7a8c79d 100644 --- a/sound/core/oss/mixer_oss.c +++ b/sound/core/oss/mixer_oss.c @@ -1177,7 +1177,8 @@ static void snd_mixer_oss_proc_write(struct snd_info_entry *entry, struct snd_mixer_oss *mixer = entry->private_data; char line[128], str[32], idxstr[16]; const char *cptr; - int ch, idx; + unsigned int idx; + int ch; struct snd_mixer_oss_assign_table *tbl; struct slot *slot; |