summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@redhat.com>2008-09-26 17:01:12 +0930
committerPeter Hutterer <peter.hutterer@redhat.com>2008-10-03 15:27:07 +0930
commit036d424827726b0c804ae1532109253270744207 (patch)
tree1a0696a6e17e89fdea2de3d704d9bc0f21edd5ca /hw
parent56a24cf894a142b18c7f18e294074c32031f3d14 (diff)
xfree86: don't let DGA steal key events outside of [9,255].
Diffstat (limited to 'hw')
-rw-r--r--hw/xfree86/common/xf86DGA.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c
index 4dd31d899..83a1a6592 100644
--- a/hw/xfree86/common/xf86DGA.c
+++ b/hw/xfree86/common/xf86DGA.c
@@ -922,6 +922,9 @@ DGAStealKeyEvent(DeviceIntPtr dev, int index, int key_code, int is_down)
if(DGAScreenKey == NULL) /* no DGA */
return FALSE;
+ if (key_code < 8 || key_code > 255)
+ return FALSE;
+
pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]);
if(!pScreenPriv || !pScreenPriv->grabKeyboard) /* no direct mode */