Skip to content
Commit c2500bdf authored by Michael Zaidman's avatar Michael Zaidman Committed by Jiri Kosina
Browse files

HID: ft260: fix a NULL pointer dereference in ft260_i2c_write



The zero-length passed into the ft260_i2c_write() triggered the
NULL pointer dereference in the debug message on data[0] access.
Since the controller does not support a write of zero length,
let's not allow it.

Before:

$ sudo i2ctransfer -y 13 w0@0x51
Killed

After:

$ sudo i2ctransfer -y 13 w0@0x51
Error: Sending messages failed: Invalid argument

Reported-by: default avatarEnrik Berkhan <Enrik.Berkhan@inka.de>
Signed-off-by: default avatarMichael Zaidman <michael.zaidman@gmail.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 4b3da685
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment