Revert "Staging: comedi: integer overflow in do_insnlist_ioctl()"

This reverts commit e384a41141.
It's not the correct way to solve this issue.

Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Greg Kroah-Hartman 2011-11-28 04:34:34 +09:00
parent e384a41141
commit 06b446c8af

View File

@ -670,11 +670,6 @@ static int do_insnlist_ioctl(struct comedi_device *dev,
goto error;
}
if (sizeof(struct comedi_insn) * insnlist.n_insns < insnlist.n_insns) {
ret = -EINVAL;
goto error;
}
insns =
kmalloc(sizeof(struct comedi_insn) * insnlist.n_insns, GFP_KERNEL);
if (!insns) {