dix: null out dummyDev, otherwise Xephyr dereferences random pointers.

SendEventToAllWindow eventually causes a IsInterferingGrab(), which attempts
to dereference dev->deviceGrab.grab.
This commit is contained in:
Peter Hutterer 2008-05-31 10:24:37 +09:30
parent 150c2f55a5
commit 62c1a32976

View File

@ -376,7 +376,8 @@ ActivateDevice(DeviceIntPtr dev)
ev.time = currentTime.milliseconds;
ev.devchange = DeviceAdded;
ev.deviceid = dev->id;
dummyDev.id = 0;
memset(&dummyDev, 0, sizeof(DeviceIntRec));
SendEventToAllWindows(&dummyDev, DevicePresenceNotifyMask,
(xEvent *) &ev, 1);