[PATCH xserver] dix: Avoid writing uninitialized bytes in deliverPropertyNotifyEvent
Hans de Goede
hdegoede at redhat.com
Mon Aug 15 06:15:33 UTC 2016
Hi,
On 13-08-16 18:06, Keith Packard wrote:
> Make sure the whole event is initialized, instead of leaving the pad
> bytes unset.
>
> Signed-off-by: Keith Packard <keithp at keithp.com>
LGTM:
Reviewed-by: Hans de Goede <hdegoede at redhat.com>
Regards,
Hans
> ---
> dix/property.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/dix/property.c b/dix/property.c
> index bde2af8..fa4da2d 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);
> }
>
More information about the xorg-devel
mailing list