From: David Schleef Date: Fri, 31 Jan 2003 03:49:26 +0000 (+0000) Subject: Fix missing bounds check X-Git-Tag: r0_7_67x~120 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1e985f9dba0e9de90535aa48ed5cd1dd5b658c61;p=comedi.git Fix missing bounds check --- diff --git a/comedi/drivers/comedi_parport.c b/comedi/drivers/comedi_parport.c index bb1d8e22..8f963514 100644 --- a/comedi/drivers/comedi_parport.c +++ b/comedi/drivers/comedi_parport.c @@ -170,6 +170,8 @@ static int parport_insn_c(comedi_device *dev,comedi_subdevice *s, static int parport_intr_insn(comedi_device *dev,comedi_subdevice *s, comedi_insn *insn,lsampl_t *data) { + if(insn->n<1)return -EINVAL; + data[1] = 0; return 2; }