ALSA: oss: underflow in snd_mixer_oss_proc_write()
Subsystems (2)
PATCH 1/1 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 <[email protected]>
sound/core/oss/mixer_oss.c +2 -1
@@ -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;
Takashi Iwai
AppliedQuoted 5 lines · Dan Carpenter
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 <[email protected]>
Applied, thanks.
Takashi
Quoted 16 lines
sound/core/oss/mixer_oss.c +2
-1@@ -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;