Skip to content

Commit

Permalink
bna: off by one
Browse files Browse the repository at this point in the history
The mod->mbhdlr[] array has BFI_MC_MAX elements.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Sep 19, 2010
1 parent 8f8f103 commit 0746556
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/bna/bfa_ioc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1514,7 +1514,7 @@ bfa_nw_ioc_mbox_isr(struct bfa_ioc *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);
Expand Down

0 comments on commit 0746556

Please sign in to comment.