Fix missing bounds check
authorDavid Schleef <ds@schleef.org>
Fri, 31 Jan 2003 03:49:26 +0000 (03:49 +0000)
committerDavid Schleef <ds@schleef.org>
Fri, 31 Jan 2003 03:49:26 +0000 (03:49 +0000)
comedi/drivers/comedi_parport.c

index bb1d8e22e27301c01d0e53eb468d3e09e6942e86..8f9635140f81f197d70a7d0067f6ebb306d56d97 100644 (file)
@@ -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;
 }