mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [2.6 patch] drivers/scsi/psi240i.c: fix an array overrun
@ 2006-11-06 14:21 Adrian Bunk
  0 siblings, 0 replies; only message in thread
From: Adrian Bunk @ 2006-11-06 14:21 UTC (permalink / raw)
  To: linux-scsi; +Cc: linux-kernel

This patch fixes an array overrun spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

--- linux-2.6/drivers/scsi/psi240i.c.old	2006-11-06 15:18:08.000000000 +0100
+++ linux-2.6/drivers/scsi/psi240i.c	2006-11-06 15:18:43.000000000 +0100
@@ -328,7 +328,7 @@ static void Irq_Handler (int irq, void *
 				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];

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-11-06 14:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-06 14:21 [2.6 patch] drivers/scsi/psi240i.c: fix an array overrun Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®