From: Adrian Bunk Date: Thu, 9 Nov 2006 03:56:37 +0000 (-0800) Subject: [SCSI] psi240i.c: fix an array overrun X-Git-Tag: v2.6.19~86^2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=05052f7f130b1232faeee1674a5bc41f67746cff;p=linux-2.6-omap-h63xx.git [SCSI] psi240i.c: fix an array overrun Fix an array overrun spotted by the Coverity checker. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/psi240i.c b/drivers/scsi/psi240i.c index ac0419e2714..899e89d6fe6 100644 --- a/drivers/scsi/psi240i.c +++ b/drivers/scsi/psi240i.c @@ -328,7 +328,7 @@ static void Irq_Handler (int irq, void *dev_id) pinquiryData->AdditionalLength = 35 - 4; // Fill in vendor identification fields. - for ( z = 0; z < 20; z += 2 ) + for ( z = 0; z < 8; z += 2 ) { pinquiryData->VendorId[z] = ((UCHAR *)identifyData.ModelNumber)[z + 1]; pinquiryData->VendorId[z + 1] = ((UCHAR *)identifyData.ModelNumber)[z];