ALSA: mixart: range checking proc file
authorDan Carpenter <error27@gmail.com>
Tue, 6 Apr 2010 16:31:26 +0000 (19:31 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 26 May 2010 21:27:05 +0000 (14:27 -0700)
commit8a63de3a1462918dcba19f19ba0304284654a193
tree49fa45314c2f18a61ecfe95f74ea602568f94b14
parentce8838c66d56085122fb275c1f7d3821245fca54
ALSA: mixart: range checking proc file

commit b0cc58a25d04160d39a80e436847eaa2fbc5aa09 upstream.

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>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
sound/pci/mixart/mixart.c