[PATCH] Fix num_masks/length overflow test for XiSelectEvents
Alan Coopersmith
alan.coopersmith at sun.com
Tue Sep 15 13:54:52 PDT 2009
Have to set windowid to a valid value first, since that check
appears earlier in the code than the masks/length check.
Signed-off-by: Alan Coopersmith <alan.coopersmith at sun.com>
---
test/xi2/protocol-xiselectevents.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/test/xi2/protocol-xiselectevents.c b/test/xi2/protocol-xiselectevents.c
index f314462..24698fa 100644
--- a/test/xi2/protocol-xiselectevents.c
+++ b/test/xi2/protocol-xiselectevents.c
@@ -285,10 +285,10 @@ static void test_XISelectEvents(void)
g_test_message("Triggering num_masks/length overflow");
/* Integer overflow - req->length can't hold that much */
+ req->win = ROOT_WINDOW_ID;
req->num_masks = 0xFFFF;
request_XISelectEvent(req, BadLength);
- req->win = ROOT_WINDOW_ID;
req->num_masks = 1;
g_test_message("Triggering bogus mask length error");
--
1.5.6.5
More information about the xorg-devel
mailing list