dix/getevents.c | 2 +- xkb/xkbLEDs.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-)
New commits: commit bc72ef3a159efd67067322c043bba444869dc356 Author: Peter Hutterer <[EMAIL PROTECTED]> Date: Wed Jan 30 10:39:54 2008 +1030 xkb: don't update LEDs if they don't exist. (Bug #13961) In some weird cases we call this function when there is no SrvLedInfo on the device. And it turns out null-pointer dereferences are bad. X.Org Bug 13961 <http://bugs.freedesktop.org/show_bug.cgi?id=13961> (cherry picked from commit d954f9c80348de294602d931d387e5cd1ef4b9a5) diff --git a/xkb/xkbLEDs.c b/xkb/xkbLEDs.c index d607d90..d28973c 100644 --- a/xkb/xkbLEDs.c +++ b/xkb/xkbLEDs.c @@ -63,6 +63,9 @@ XkbSrvLedInfoPtr sli; sli= XkbFindSrvLedInfo(dev,XkbDfltXIClass,XkbDfltXIId,0); + if (!sli) + return update; + if (state_changes&(XkbModifierStateMask|XkbGroupStateMask)) update|= sli->usesEffective; if (state_changes&(XkbModifierBaseMask|XkbGroupBaseMask)) commit e98027c3ac7195fec665ef393d980b02870ca1b8 Author: Peter Hutterer <[EMAIL PROTECTED]> Date: Tue Dec 18 13:57:07 2007 +1030 dix: set the correct number of valuators in valuator events. (first_valuator + num_valuators) must never be larger than the number of axes, otherwise DIX freaks out. And from looking at libXI, anything larger than 6 is wrong too. (cherry picked from commit 9f6ae61ad12cc2813d04405458e1ca5aed8a539e) diff --git a/dix/getevents.c b/dix/getevents.c index 12d8189..b7ba69b 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -344,7 +344,7 @@ getValuatorEvents(xEvent *events, DeviceIntPtr pDev, int first_valuator, for (i = first_valuator; i < final_valuator; i += 6, xv++, events++) { xv->type = DeviceValuator; xv->first_valuator = i; - xv->num_valuators = num_valuators; + xv->num_valuators = ((num_valuators - i) > 6) ? 6 : (num_valuators - i); xv->deviceid = pDev->id; switch (final_valuator - i) { case 6: -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]