s626: don't dereference insn->data
authorIan Abbott <abbotti@mev.co.uk>
Fri, 28 Sep 2012 11:05:05 +0000 (12:05 +0100)
committerIan Abbott <abbotti@mev.co.uk>
Fri, 28 Sep 2012 11:05:05 +0000 (12:05 +0100)
commit44acf3a7093fd0c61b7af587e59cea4fd823c826
tree9dcc7fdcd8f85af7afced6ca7815794045a3d5ad
parent815e9a9f585613f1802ae4c6b2df3a1d172f5de4
s626: don't dereference insn->data

`s626_enc_insn_config()` is incorrectly dereferencing `insn->data` which
is a pointer to user memory.  It should be using the separate `data`
parameter that points to a copy of the data in kernel memory.

Note that this insn_config handler is being used incorrectly by this
driver anyway.  `data[0]` should be used to select the type of
configuration being performed, but this driver is treating it as a
counter preload value.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
comedi/drivers/s626.c