Re: [PATCH 1/1] integer overflow issue in 'appletouch' driver

From: Johannes Berg
Date: Mon Mar 08 2010 - 02:42:13 EST


On Fri, 2010-03-05 at 11:47 -0800, Vadim Zaliva wrote:
> This small patch is fixing an integer overflow issue in 'appletouch' driver.
>
> In particular, 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.

Hmm, you're probably right, and I cannot test with my powerbook as I'm
about to leave on travel and it's at my parents.

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/