HID: core: Fix size as type u32
authorAaron Ma <aaron.ma@canonical.com>
Mon, 8 Jan 2018 02:41:41 +0000 (10:41 +0800)
committerJiri Kosina <jkosina@suse.cz>
Fri, 16 Feb 2018 12:30:56 +0000 (13:30 +0100)
commit6de0b13cc0b4ba10e98a9263d7a83b940720b77a
treedf6ee2f81950bfddbf9b3719692a9fcfa2f82275
parentac75a041048b8c1f7418e27621ca5efda8571043
HID: core: Fix size as type u32

When size is negative, calling memset will make segment fault.
Declare the size as type u32 to keep memset safe.

size in struct hid_report is unsigned, fix return type of
hid_report_len to u32.

Cc: stable@vger.kernel.org
Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-core.c
include/linux/hid.h