From 1e985f9dba0e9de90535aa48ed5cd1dd5b658c61 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Fri, 31 Jan 2003 03:49:26 +0000 Subject: [PATCH] Fix missing bounds check --- comedi/drivers/comedi_parport.c | 2 ++ 1 file changed, 2 insertions(+) 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; } -- 2.26.2