diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2009-09-15 13:54:51 -0700 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-09-16 11:04:25 +1000 |
commit | 13decf5efe76e735a003227c951e58a41e36a8b5 (patch) | |
tree | d38dd2ea22e1c3dcc11f5c5250a840c7a3b0f045 | |
parent | 38a61e9a7cf616e26a79dba815bf67737317d1eb (diff) |
test_convert_XIRawEvent: Don't write more data than the struct holds
sizeof(in.valuators.mask) * 8 == 40, but the valuators arrays only
holds 36 entries, so the test was smashing the stack when 36 < i < 40
(leading to core dumps on Solaris x86, since the return address was
overwritten with an invalid pointer).
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | test/xi2/protocol-eventconvert.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/xi2/protocol-eventconvert.c b/test/xi2/protocol-eventconvert.c index f723f7436..65ddec507 100644 --- a/test/xi2/protocol-eventconvert.c +++ b/test/xi2/protocol-eventconvert.c @@ -247,7 +247,7 @@ static void test_convert_XIRawEvent(void) XIClearMask(in.valuators.mask, i); } - for (i = 0; i < sizeof(in.valuators.mask) * 8; i++) + for (i = 0; i < MAX_VALUATORS; i++) { XISetMask(in.valuators.mask, i); |