xserver: Branch 'master'
Peter Hutterer
whot at kemper.freedesktop.org
Mon Sep 21 23:42:24 PDT 2009
dix/getevents.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 824a09d856a5f750694e11d2fd2faaa3de705eaa
Author: Simon Thum <simon.thum at gmx.de>
Date: Mon Sep 21 15:23:27 2009 +0200
dix: move bounds check before access
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/dix/getevents.c b/dix/getevents.c
index 7ddf88b..5224d31 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -578,12 +578,13 @@ GetMaximumEventsNum(void) {
static void
clipAxis(DeviceIntPtr pDev, int axisNum, int *val)
{
- AxisInfoPtr axis = pDev->valuator->axes + axisNum;
- /* InitValuatoraAxisStruct ensures that (min < max). */
+ AxisInfoPtr axis;
if (axisNum >= pDev->valuator->numAxes)
return;
+ axis = pDev->valuator->axes + axisNum;
+
/* If a value range is defined, clip. If not, do nothing */
if (axis->max_value <= axis->min_value)
return;
More information about the xorg-commit
mailing list