Test: Input: Only ever set up to MAX_VALUATORS valuators
authorDaniel Stone <daniel@fooishbar.org>
Tue, 1 Mar 2011 11:11:22 +0000 (11:11 +0000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 30 Jun 2011 22:46:28 +0000 (08:46 +1000)
commit9444e40d77508d545e3c0a8123f61950c22d89fa
tree81f460aed0edd76ce68b96fef78be29f9eef996a
parent1e65a01cf73f1fbdfe0d63eaecea412cf8472cb4
Test: Input: Only ever set up to MAX_VALUATORS valuators

Previously, the input tests were working up to sizeof(mask) * 8, which
could be more than the arrays; the latter only being sized as
MAX_VALUATORS.

Hypothetically, if you were switching the stored valuator values to
double instead of uint32_t, and you attempted to set the 39th member of
a MAX_VALUATORS-sized (36) array, you'd probably end up smashing
ev->key_repeat into oblivion and then tripping the check for invalid
flags because you haven't yet put XIPointerEmulated into the valid flags
for XI_Motion.  Probably.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test/xi2/protocol-eventconvert.c