Skip to content
Commit 04b4b88c authored by Vadim Zaliva's avatar Vadim Zaliva Committed by Dmitry Torokhov
Browse files

Input: appletouch - fix integer overflow issue



When reading data from Geyser 2 touchpads used on post Oct 2005 Apple
PowerBooks the driver was casting X and Y coordinates values to
'signed char'. Testing on one of such PowerBooks I have noticed that
touchpad always generates positive values, but some of them are greater
that 127, and thus, when cast to 'signed char' being interpreted as
a negative.

Such bigger values have been observed infrequently, closer to the
edges of a touchpad, so the problem was not very visible.
Nevertheless, the patch would potentially improve touchpad
driver accuracy.

Signed-off-by: default avatarVadim Zaliva <lord@crocodile.org>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 4eb6f91b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment