From 13decf5efe76e735a003227c951e58a41e36a8b5 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Tue, 15 Sep 2009 13:54:51 -0700 Subject: 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 Signed-off-by: Peter Hutterer --- test/xi2/protocol-eventconvert.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') 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); -- cgit v1.2.3