diff options
author | Aaron Ma <aaron.ma@canonical.com> | 2018-01-08 10:41:40 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-04-24 09:32:06 +0200 |
commit | dbae9a8dae744af765527099e685e22e6fbc46eb (patch) | |
tree | 429a9e0aa9c03072a60d570d22ac90122a0f4e3c /arch/powerpc/platforms | |
parent | 0ab6b8c91ecfbe8d2c4fb5119d6f67b12e1be2cc (diff) |
HID: i2c-hid: fix size check and type usage
commit ac75a041048b8c1f7418e27621ca5efda8571043 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/powerpc/platforms')
0 files changed, 0 insertions, 0 deletions