Skip to content

Commit

Permalink
Revert "Staging: comedi: integer overflow in do_insnlist_ioctl()"
Browse files Browse the repository at this point in the history
This reverts commit e384a41.
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>
  • Loading branch information
gregkh committed Nov 27, 2011
1 parent e384a41 commit 06b446c
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/staging/comedi/comedi_fops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 06b446c

Please sign in to comment.