summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Xi/xiselectev.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Xi/xiselectev.c b/Xi/xiselectev.c
index 8c1b2b106..6734da991 100644
--- a/Xi/xiselectev.c
+++ b/Xi/xiselectev.c
@@ -73,6 +73,9 @@ ProcXISelectEvent(ClientPtr client)
REQUEST(xXISelectEventsReq);
REQUEST_AT_LEAST_SIZE(xXISelectEventsReq);
+ if (stuff->num_masks == 0)
+ return BadValue;
+
rc = dixLookupWindow(&win, stuff->window, client, DixReceiveAccess);
if (rc != Success)
return rc;