Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c65c64d0 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

staging: comedi: quatech_daqp_cs: fix possible memory dereference issue



In daqp_attach(), the first options value passed in the comedi_devconfig
is used as an index to the private dev_table[] in this driver. This table
is used to pass the pcmcia_device to the comedi_driver.

Fix the code so that the index is checked before the table is accessed
so that we don't get a possible memory dereference BUG.

Change the error returned to the comedi core from -EIO to -ENODEV.

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e23fe9a1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment