[PATCH] staging: comedi: addi_apci_1500: fix array access out of bounds error
Ian Abbott
abbotti at mev.co.uk
Thu Jan 29 12:31:07 UTC 2015
On 28/01/15 16:58, H Hartley Sweeten wrote:
> The private data 'pm', 'pt', and 'pp' array members hold the trigger mode
> parameters for ports A and B. Both ports are 8-bits and the arrays are 16-bits.
> Array index 0 defines the AND mode and index 1 the OR mode parameters for both
> ports.
>
> The valid triggers to start the async command are 0 to 3 which select the
> AND/OR mode for each port.
>
> The 'pb_trig' (the array index for port B) in apci1500_di_inttrig_start() is
> incorrect and results in an index of 0 or 2. Fix the calc so that the correct
> index (0/1) is used.
>
> Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
> Reported-by: Asaf Vertz <asaf.vertz at tandemg.com>
> Cc: Ian Abbott <abbotti at mev.co.uk>
> Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
Reviewed-by: Ian Abbott <abbotti at mev.co.uk>
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti at mev.co.uk> )=-
-=( Web: http://www.mev.co.uk/ )=-
More information about the devel
mailing list