Skip to contentSkip to conversation

scsi/bfa: off by one in bfa_ioc_mbox_isr()

PATCH New Dan Carpenter 1 participant 1 message Jun 21, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi/bfa: off by one in bfa_ioc_mbox_isr()

This should be ">=" here instead of ">" so that we don't read past the end of the array.

drivers/scsi/bfa/bfa_ioc.c +1 -1
index e038bc9..0ba624d 100644
@@ -1595,7 +1595,7 @@ bfa_ioc_mbox_isr(struct bfa_ioc_s *ioc)
 		return;
 	}
 
-	if ((mc > BFI_MC_MAX) || (mod->mbhdlr[mc].cbfn = NULL))
+	if ((mc >= BFI_MC_MAX) || (mod->mbhdlr[mc].cbfn = NULL))
 		return;
 
 	mod->mbhdlr[mc].cbfn(mod->mbhdlr[mc].cbarg, &m);