diff options
author | Keith Packard <keithp@keithp.com> | 2016-08-12 17:40:55 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2016-08-15 08:54:45 -0700 |
commit | fa2bc06407665ee074f5914d0f83d4114b20fc8e (patch) | |
tree | 31d5649028e63b49e5830d7cc5107e4f84cac990 | |
parent | 67fc5d68f967d19236221b2c0c2e0fe45acf560f (diff) |
dix: Avoid writing uninitialized bytes in deliverPropertyNotifyEvent
Make sure the whole event is initialized, instead of leaving the pad
bytes unset.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
-rw-r--r-- | dix/property.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/dix/property.c b/dix/property.c index bde2af8cf..fa4da2d42 100644 --- a/dix/property.c +++ b/dix/property.c @@ -110,10 +110,12 @@ deliverPropertyNotifyEvent(WindowPtr pWin, int state, Atom atom) { xEvent event; UpdateCurrentTimeIf(); - event.u.property.window = pWin->drawable.id; - event.u.property.state = state; - event.u.property.atom = atom; - event.u.property.time = currentTime.milliseconds; + event = (xEvent) { + .u.property.window = pWin->drawable.id, + .u.property.state = state, + .u.property.atom = atom, + .u.property.time = currentTime.milliseconds, + }; event.u.u.type = PropertyNotify; DeliverEvents(pWin, &event, 1, (WindowPtr) NULL); } |