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: NAaron Ma <aaron.ma@canonical.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
Showing
想要评论请 注册 或 登录