Skip to content

Commit

Permalink
Staging: comedi: off by one in doDevConfig()
Browse files Browse the repository at this point in the history
Changed > to >= to avoid array overflow.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Dan Carpenter authored and Greg Kroah-Hartman committed Mar 4, 2010
1 parent ef4ffb7 commit 5d3aed7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/comedi/drivers/comedi_bond.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ static int doDevConfig(struct comedi_device *dev, struct comedi_devconfig *it)
int sdev = -1, nchans, tmp;
struct BondedDevice *bdev = NULL;

if (minor < 0 || minor > COMEDI_NUM_BOARD_MINORS) {
if (minor < 0 || minor >= COMEDI_NUM_BOARD_MINORS) {
ERROR("Minor %d is invalid!\n", minor);
return 0;
}
Expand Down

0 comments on commit 5d3aed7

Please sign in to comment.