mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-18 06:50:08 +00:00
staging: comedi: 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 dereferencing the separate `data` parameter that points to a copy of the data in kernel memory. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
67f2021fb1
commit
b655c2c478
@ -1825,7 +1825,7 @@ static int s626_enc_insn_config(struct comedi_device *dev,
|
||||
/* (data==NULL) ? (Preloadvalue=0) : (Preloadvalue=data[0]); */
|
||||
|
||||
k->SetMode(dev, k, Setup, TRUE);
|
||||
Preload(dev, k, *(insn->data));
|
||||
Preload(dev, k, data[0]);
|
||||
k->PulseIndex(dev, k);
|
||||
SetLatchSource(dev, k, valueSrclatch);
|
||||
k->SetEnable(dev, k, (uint16_t) (enab != 0));
|
||||
|
Loading…
Reference in New Issue
Block a user