Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fffa6923 authored by Dan Carpenter's avatar Dan Carpenter Committed by James Bottomley
Browse files

[SCSI] bfa: off by one in bfa_ioc_mbox_isr()



If mc == BFI_MC_MAX then we're reading past the end of the
mod->mbhdlr[] array.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarKrishna Gudipati <kgudipat@brocade.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent 9e1a1537
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -2357,7 +2357,7 @@ bfa_ioc_mbox_isr(struct bfa_ioc_s *ioc)
			return;
			return;
		}
		}


		if ((mc > BFI_MC_MAX) || (mod->mbhdlr[mc].cbfn == NULL))
		if ((mc >= BFI_MC_MAX) || (mod->mbhdlr[mc].cbfn == NULL))
			return;
			return;


		mod->mbhdlr[mc].cbfn(mod->mbhdlr[mc].cbarg, &m);
		mod->mbhdlr[mc].cbfn(mod->mbhdlr[mc].cbarg, &m);