Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5a1f8c42 authored by Dan Carpenter's avatar Dan Carpenter Committed by Takashi Iwai
Browse files

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent ab30965d
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -1177,7 +1177,8 @@ static void snd_mixer_oss_proc_write(struct snd_info_entry *entry,
	struct snd_mixer_oss *mixer = entry->private_data;
	struct snd_mixer_oss *mixer = entry->private_data;
	char line[128], str[32], idxstr[16];
	char line[128], str[32], idxstr[16];
	const char *cptr;
	const char *cptr;
	int ch, idx;
	unsigned int idx;
	int ch;
	struct snd_mixer_oss_assign_table *tbl;
	struct snd_mixer_oss_assign_table *tbl;
	struct slot *slot;
	struct slot *slot;