osst: fix read buffer overflow
authorRoel Kluin <roel.kluin@gmail.com>
Wed, 11 Aug 2010 01:01:10 +0000 (18:01 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 11 Aug 2010 15:58:59 +0000 (08:58 -0700)
commitef3f7cc41280e9611a837df1fedf3f6d4d921a75
tree63df51b25c2d8e3fb584cbfbe49cb0bdcbd07895
parent13bcbc008790b05413c9a16763b423c206528c0a
osst: fix read buffer overflow

Check whether index is within bounds before testing the element.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Willem Riede <osst@riede.org>
Cc: James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/scsi/osst.c