public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] off by one in FlashPoint.c
@ 2009-12-27 13:14 Dan Carpenter
  2009-12-28 17:14 ` Joe Eykholt
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2009-12-27 13:14 UTC (permalink / raw)
  To: James E.J. Bottomley; +Cc: linux-scsi

The check should be >= instead of > or we could go past the end of the
array.

Signed-off-by: Dan Carpenter <error27@gmail.com>

--- orig/drivers/scsi/FlashPoint.c	2009-12-27 11:35:58.000000000 +0200
+++ devel/drivers/scsi/FlashPoint.c	2009-12-27 11:36:19.000000000 +0200
@@ -3924,7 +3924,7 @@
 {
 	struct sccb_mgr_tar_info *currTar_Info;
 
-	if ((p_sccb->TargID > MAX_SCSI_TAR) || (p_sccb->Lun > MAX_LUN)) {
+	if ((p_sccb->TargID >= MAX_SCSI_TAR) || (p_sccb->Lun > MAX_LUN)) {
 		return;
 	}
 	currTar_Info = &FPT_sccbMgrTbl[p_card][p_sccb->TargID];



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-12-28 18:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-27 13:14 [patch] off by one in FlashPoint.c Dan Carpenter
2009-12-28 17:14 ` Joe Eykholt
2009-12-28 18:03   ` Dan Carpenter
2009-12-28 18:08   ` [patch] off by one in FlashPoint.c (v2) Dan Carpenter

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