From: Ian Abbott Date: Wed, 23 Nov 2011 14:43:03 +0000 (+0000) Subject: Revert "Check integer overflow in do_insnlist_ioctl()" X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3d13a6221509364613b2580ed199e5ba7a5327e9;p=comedi.git Revert "Check integer overflow in do_insnlist_ioctl()" Xi Wang pointed out a flaw in the current check. --- diff --git a/comedi/comedi_fops.c b/comedi/comedi_fops.c index e46c7c4b..4d3a5dd1 100644 --- a/comedi/comedi_fops.c +++ b/comedi/comedi_fops.c @@ -701,12 +701,6 @@ static int do_insnlist_ioctl(comedi_device * dev, void *arg, void *file) goto error; } - if (sizeof(comedi_insn) * insnlist.n_insns < insnlist.n_insns) { - DPRINTK("number of instructions too large\n"); - ret = -EINVAL; - goto error; - } - insns = kmalloc(sizeof(comedi_insn) * insnlist.n_insns, GFP_KERNEL); if (!insns) { DPRINTK("kmalloc failed\n");