ALSA: mixart: range checking proc file
commitfb864d07dfc560925e5395efe8a90915fce062a8
authorDan Carpenter <error27@gmail.com>
Tue, 6 Apr 2010 16:31:26 +0000 (6 19:31 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Jul 2010 17:11:19 +0000 (5 10:11 -0700)
treee252a69981348830214f9b61541fe7813f9d8e54
parenta47d3602bf588087b2db080f9268e7dc0433fc86
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