From: Ian Abbott Date: Mon, 4 Jan 2010 11:22:14 +0000 (+0000) Subject: comedi_bond: fix off by one in doDevConfig(). X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d3579017d8248b7b27be43598f5adb77da3b9b85;p=comedi.git comedi_bond: fix off by one in doDevConfig(). (Staging patch from Dan Carpenter.) --- diff --git a/comedi/drivers/comedi_bond.c b/comedi/drivers/comedi_bond.c index bd7e3d52..a18a6d34 100644 --- a/comedi/drivers/comedi_bond.c +++ b/comedi/drivers/comedi_bond.c @@ -402,7 +402,7 @@ static int doDevConfig(comedi_device * dev, comedi_devconfig * it) int sdev = -1, nchans, tmp; BondedDevice *bdev = 0; - 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; }