dix: Use CopyPartialInternalEvent in EnqueueEvent
The event might be a DeviceEvent allocated on the stack, in AccessXKeyboardEvent for instance. Fixes out-of-bounds read. Signed-off-by: Mike Gorse <mgorse@suse.com>
This commit is contained in:
parent
d266274ca9
commit
2ef5ef57bd
|
@ -1215,7 +1215,7 @@ EnqueueEvent(InternalEvent *ev, DeviceIntPtr device)
|
||||||
qe->pScreen = pSprite->hotPhys.pScreen;
|
qe->pScreen = pSprite->hotPhys.pScreen;
|
||||||
qe->months = currentTime.months;
|
qe->months = currentTime.months;
|
||||||
qe->event = (InternalEvent *) (qe + 1);
|
qe->event = (InternalEvent *) (qe + 1);
|
||||||
memcpy(qe->event, event, eventlen);
|
CopyPartialInternalEvent(qe->event, (InternalEvent *)event);
|
||||||
xorg_list_append(&qe->next, &syncEvents.pending);
|
xorg_list_append(&qe->next, &syncEvents.pending);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue