]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: mixart: range checking proc file
authorDan Carpenter <error27@gmail.com>
Tue, 6 Apr 2010 16:31:26 +0000 (19:31 +0300)
committerTakashi Iwai <tiwai@suse.de>
Tue, 6 Apr 2010 16:52:39 +0000 (18:52 +0200)
commitd59ed661b33929a58d1048a095069350f290c1e0
treea20f259f6d2081e40ac979db8daad6b71ff7342c
parentdf0b51fd1c4ad06f5abeef5355990780704fbeeb
ALSA: mixart: range checking proc file

The original code doesn't take into consideration that the value of
MIXART_BA0_SIZE - pos can be less than zero which would lead to a large
unsigned value for "count".

Also I moved the check that read size is a multiple of 4 bytes below
the code that adjusts "count".

Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: <stable@kernel.org>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/mixart/mixart.c