esas2r: Fix array overrun
authorAlan <gnomes@lxorguk.ukuu.org.uk>
Mon, 15 Feb 2016 19:01:29 +0000 (19:01 +0000)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 24 Feb 2016 02:27:02 +0000 (21:27 -0500)
commit5b2e0c1befe299fbd570b1a17dec8c5aa367a623
tree6605237094757147637805f26fd2e8de7eb9181b
parent5a51a7abca133860a6f4429655a9eda3c4afde32
esas2r: Fix array overrun

Check the array size *before* dereferencing it with a user provided
offset.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/esas2r/esas2r_ioctl.c