projects
/
comedi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea84a0a
)
Revert "Check integer overflow in do_insnlist_ioctl()"
author
Ian Abbott
<abbotti@mev.co.uk>
Wed, 23 Nov 2011 14:43:03 +0000
(14:43 +0000)
committer
Ian Abbott
<abbotti@mev.co.uk>
Wed, 23 Nov 2011 14:43:03 +0000
(14:43 +0000)
Xi Wang pointed out a flaw in the current check.
comedi/comedi_fops.c
patch
|
blob
|
history
diff --git
a/comedi/comedi_fops.c
b/comedi/comedi_fops.c
index e46c7c4bac097f86930d78869d53c10cd9eb79e3..4d3a5dd1d503213e181d20bad0b1f3fe6394886d 100644
(file)
--- 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");