parent
2387bfa5ff
commit
d5bc41b882
|
@ -1,3 +1,8 @@
|
||||||
|
2006-04-09 Daniel Stone <daniel@freedesktop.org>
|
||||||
|
|
||||||
|
* Xi/exevents.c:
|
||||||
|
Coverity #323, #445, #446, #447: Fix potential NULL dereferences.
|
||||||
|
|
||||||
2006-04-07 Aaron Plattner <aplattner@nvidia.com>
|
2006-04-07 Aaron Plattner <aplattner@nvidia.com>
|
||||||
|
|
||||||
* hw/xfree86/common/xf86Module.h:
|
* hw/xfree86/common/xf86Module.h:
|
||||||
|
|
|
@ -175,6 +175,9 @@ ProcessOtherEvent(xEventPtr xE, register DeviceIntPtr other, int count)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xE->u.u.type == DeviceKeyPress) {
|
if (xE->u.u.type == DeviceKeyPress) {
|
||||||
|
if (!k)
|
||||||
|
return;
|
||||||
|
|
||||||
modifiers = k->modifierMap[key];
|
modifiers = k->modifierMap[key];
|
||||||
kptr = &k->down[key >> 3];
|
kptr = &k->down[key >> 3];
|
||||||
if (*kptr & bit) { /* allow ddx to generate multiple downs */
|
if (*kptr & bit) { /* allow ddx to generate multiple downs */
|
||||||
|
@ -204,6 +207,9 @@ ProcessOtherEvent(xEventPtr xE, register DeviceIntPtr other, int count)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (xE->u.u.type == DeviceKeyRelease) {
|
} else if (xE->u.u.type == DeviceKeyRelease) {
|
||||||
|
if (!k)
|
||||||
|
return;
|
||||||
|
|
||||||
kptr = &k->down[key >> 3];
|
kptr = &k->down[key >> 3];
|
||||||
if (!(*kptr & bit)) /* guard against duplicates */
|
if (!(*kptr & bit)) /* guard against duplicates */
|
||||||
return;
|
return;
|
||||||
|
@ -226,6 +232,9 @@ ProcessOtherEvent(xEventPtr xE, register DeviceIntPtr other, int count)
|
||||||
if (other->fromPassiveGrab && (key == other->activatingKey))
|
if (other->fromPassiveGrab && (key == other->activatingKey))
|
||||||
deactivateDeviceGrab = TRUE;
|
deactivateDeviceGrab = TRUE;
|
||||||
} else if (xE->u.u.type == DeviceButtonPress) {
|
} else if (xE->u.u.type == DeviceButtonPress) {
|
||||||
|
if (!b)
|
||||||
|
return;
|
||||||
|
|
||||||
kptr = &b->down[key >> 3];
|
kptr = &b->down[key >> 3];
|
||||||
*kptr |= bit;
|
*kptr |= bit;
|
||||||
if (other->valuator)
|
if (other->valuator)
|
||||||
|
@ -243,6 +252,9 @@ ProcessOtherEvent(xEventPtr xE, register DeviceIntPtr other, int count)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
} else if (xE->u.u.type == DeviceButtonRelease) {
|
} else if (xE->u.u.type == DeviceButtonRelease) {
|
||||||
|
if (!b)
|
||||||
|
return;
|
||||||
|
|
||||||
kptr = &b->down[key >> 3];
|
kptr = &b->down[key >> 3];
|
||||||
*kptr &= ~bit;
|
*kptr &= ~bit;
|
||||||
if (other->valuator)
|
if (other->valuator)
|
||||||
|
@ -1073,6 +1085,9 @@ MaybeSendDeviceMotionNotifyHint(deviceKeyButtonPointer * pEvents, Mask mask)
|
||||||
DeviceIntPtr dev;
|
DeviceIntPtr dev;
|
||||||
|
|
||||||
dev = LookupDeviceIntRec(pEvents->deviceid & DEVICE_BITS);
|
dev = LookupDeviceIntRec(pEvents->deviceid & DEVICE_BITS);
|
||||||
|
if (!dev)
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (pEvents->type == DeviceMotionNotify) {
|
if (pEvents->type == DeviceMotionNotify) {
|
||||||
if (mask & DevicePointerMotionHintMask) {
|
if (mask & DevicePointerMotionHintMask) {
|
||||||
if (WID(dev->valuator->motionHintWindow) == pEvents->event) {
|
if (WID(dev->valuator->motionHintWindow) == pEvents->event) {
|
||||||
|
@ -1094,6 +1109,9 @@ CheckDeviceGrabAndHintWindow(WindowPtr pWin, int type,
|
||||||
DeviceIntPtr dev;
|
DeviceIntPtr dev;
|
||||||
|
|
||||||
dev = LookupDeviceIntRec(xE->deviceid & DEVICE_BITS);
|
dev = LookupDeviceIntRec(xE->deviceid & DEVICE_BITS);
|
||||||
|
if (!dev)
|
||||||
|
return;
|
||||||
|
|
||||||
if (type == DeviceMotionNotify)
|
if (type == DeviceMotionNotify)
|
||||||
dev->valuator->motionHintWindow = pWin;
|
dev->valuator->motionHintWindow = pWin;
|
||||||
else if ((type == DeviceButtonPress) && (!grab) &&
|
else if ((type == DeviceButtonPress) && (!grab) &&
|
||||||
|
|
Loading…
Reference in New Issue