]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: echoaudio: read past end of array
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 23 Mar 2015 09:41:31 +0000 (12:41 +0300)
committerTakashi Iwai <tiwai@suse.de>
Mon, 23 Mar 2015 13:00:28 +0000 (14:00 +0100)
commitdc08315b39100cd9d463717c7c188c48ba48f4f4
treeabf0888bcd55c82a26218df1596cf674e51e4515
parent7f97f370658f1e419ede2ba00e7931c5b285ceb2
ALSA: echoaudio: read past end of array

We need to cap "ucontrol->id.index / num_busses_in(chip)" so the we
don't read beyond the end of the array.

I also adding a check on "in" and changing the type in
snd_echo_mixer_put() from short to unsigned int. Those changes are done
for symmetry and are cosmetic.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/echoaudio/echoaudio.c