]> err.no Git - linux-2.6/commitdiff
[SCSI] psi240i.c: fix an array overrun
authorAdrian Bunk <bunk@stusta.de>
Thu, 9 Nov 2006 03:56:37 +0000 (19:56 -0800)
committerJames Bottomley <jejb@mulgrave.(none)>
Fri, 10 Nov 2006 01:01:42 +0000 (10:01 +0900)
Fix an array overrun spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/psi240i.c

index ac0419e2714ae2df0edee98aa45a2915b84c08da..899e89d6fe678d4d35927448a7628e0a477aa430 100644 (file)
@@ -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];