mwave: fix read buffer overflow
commitdc80df567dd04738ee8b3922feacf099ae81645e
authorRoel Kluin <roel.kluin@gmail.com>
Wed, 23 Sep 2009 22:57:11 +0000 (23 15:57 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Sep 2009 14:21:03 +0000 (24 07:21 -0700)
tree709c209b063b72ed2c152ebfe3240210f1b2937e
parentdd5d81f326da8d151939b833993b799c0d0d1d6e
mwave: fix read buffer overflow

Check whether index is within bounds before grabbing the element.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/mwave/mwavedd.c