summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
Diffstat (limited to 'dix')
-rw-r--r--dix/getevents.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/dix/getevents.c b/dix/getevents.c
index 738bd361f..a6e246ac7 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -402,6 +402,7 @@ GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type,
if (!events)
return 0;
+ /* DO NOT WANT */
if (type != KeyPress && type != KeyRelease)
return 0;
@@ -409,6 +410,9 @@ GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type,
(pDev->coreEvents && !inputInfo.keyboard->key))
return 0;
+ if (key_code < 8 || key_code > 255)
+ return 0;
+
if (pDev->coreEvents)
numEvents = 2;
else