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>
(cherry picked from commit 2ef5ef57bd
)
This commit is contained in:
parent
44d6c82ac8
commit
4b925d388f
|
@ -1215,7 +1215,7 @@ EnqueueEvent(InternalEvent *ev, DeviceIntPtr device)
|
|||
qe->pScreen = pSprite->hotPhys.pScreen;
|
||||
qe->months = currentTime.months;
|
||||
qe->event = (InternalEvent *) (qe + 1);
|
||||
memcpy(qe->event, event, eventlen);
|
||||
CopyPartialInternalEvent(qe->event, (InternalEvent *)event);
|
||||
xorg_list_append(&qe->next, &syncEvents.pending);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue