aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/dix')
-rw-r--r--xorg-server/dix/devices.c1
-rw-r--r--xorg-server/dix/getevents.c3
-rw-r--r--xorg-server/dix/globals.c1
-rw-r--r--xorg-server/dix/touch.c5
4 files changed, 10 insertions, 0 deletions
diff --git a/xorg-server/dix/devices.c b/xorg-server/dix/devices.c
index d5ad08e16..21179ee59 100644
--- a/xorg-server/dix/devices.c
+++ b/xorg-server/dix/devices.c
@@ -441,6 +441,7 @@ DisableDevice(DeviceIntPtr dev, BOOL sendevent)
if (*prev != dev)
return FALSE;
+ ReleaseButtonsAndKeys(dev);
SyncRemoveDeviceIdleTime(dev->idle_counter);
dev->idle_counter = NULL;
diff --git a/xorg-server/dix/getevents.c b/xorg-server/dix/getevents.c
index 0a6a997ca..e0ef18365 100644
--- a/xorg-server/dix/getevents.c
+++ b/xorg-server/dix/getevents.c
@@ -1619,6 +1619,9 @@ GetPointerEvents(InternalEvent *events, DeviceIntPtr pDev, int type,
/* Now turn the smooth-scrolling axes back into emulated button presses
* for legacy clients, based on the integer delta between before and now */
for (i = 0; i < valuator_mask_size(&mask); i++) {
+ if (i >= pDev->valuator->numAxes)
+ break;
+
if (!valuator_mask_isset(&mask, i))
continue;
diff --git a/xorg-server/dix/globals.c b/xorg-server/dix/globals.c
index a564575f3..332b91f5c 100644
--- a/xorg-server/dix/globals.c
+++ b/xorg-server/dix/globals.c
@@ -128,6 +128,7 @@ int defaultColorVisualClass = -1;
int monitorResolution = 0;
char *display;
+int displayfd;
char *ConnectionInfo;
CARD32 TimeOutValue = DEFAULT_TIMEOUT * MILLI_PER_SECOND;
diff --git a/xorg-server/dix/touch.c b/xorg-server/dix/touch.c
index dd16367d0..401cb981a 100644
--- a/xorg-server/dix/touch.c
+++ b/xorg-server/dix/touch.c
@@ -966,6 +966,11 @@ TouchListenerAcceptReject(DeviceIntPtr dev, TouchPointInfoPtr ti, int listener,
int nev;
int i;
+ BUG_WARN(listener < 0);
+ BUG_WARN(listener >= ti->num_listeners);
+ if (listener < 0 || listener >= ti->num_listeners)
+ return BadMatch;
+
if (listener > 0) {
if (mode == XIRejectTouch)
TouchRejected(dev, ti, ti->listeners[listener].listener, NULL);