diff options
author | Aaron Ma <aaron.ma@canonical.com> | 2018-01-08 10:41:40 +0800 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2018-02-16 13:30:56 +0100 |
commit | ac75a041048b8c1f7418e27621ca5efda8571043 (patch) | |
tree | 585001fb5e3034667d927e53392ee2f17108747d /Documentation/driver-model/porting.txt | |
parent | bbca80b279745a8bd73a7d23d5b3d1e9d5705600 (diff) | |
download | op-kernel-dev-ac75a041048b8c1f7418e27621ca5efda8571043.zip op-kernel-dev-ac75a041048b8c1f7418e27621ca5efda8571043.tar.gz |
HID: i2c-hid: fix size check and type usage
When convert char array with signed int, if the inbuf[x] is negative then
upper bits will be set to 1. Fix this by using u8 instead of char.
ret_size has to be at least 3, hid_input_report use it after minus 2 bytes.
Cc: stable@vger.kernel.org
Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'Documentation/driver-model/porting.txt')
0 files changed, 0 insertions, 0 deletions