summaryrefslogtreecommitdiff
path: root/rust/helpers.c
diff options
context:
space:
mode:
authorNikita Zhandarovich <n.zhandarovich@fintech.ru>2023-04-17 09:01:48 -0700
committerJiri Kosina <jkosina@suse.cz>2023-05-23 15:08:23 +0200
commitbd249b91977b768ea02bf84d04625d2690ad2b98 (patch)
treec06cdb219a85d56279c345d49d515192656b38c0 /rust/helpers.c
parentd9eef346b601afb0bd74b49e0db06f6a5cebd030 (diff)
downloadlwn-bd249b91977b768ea02bf84d04625d2690ad2b98.tar.gz
lwn-bd249b91977b768ea02bf84d04625d2690ad2b98.zip
HID: wacom: avoid integer overflow in wacom_intuos_inout()
If high bit is set to 1 in ((data[3] & 0x0f << 28), after all arithmetic operations and integer promotions are done, high bits in wacom->serial[idx] will be filled with 1s as well. Avoid this, albeit unlikely, issue by specifying left operand's __u64 type for the right operand. Found by Linux Verification Center (linuxtesting.org) with static analysis tool SVACE. Fixes: 3bea733ab212 ("USB: wacom tablet driver reorganization") Signed-off-by: Nikita Zhandarovich <n.zhandarovich@fintech.ru> Reviewed-by: Ping Cheng <ping.cheng@wacom.com> Cc: stable@vger.kernel.org Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'rust/helpers.c')
0 files changed, 0 insertions, 0 deletions