[PATCH] prevent X crash on pressing multimedia buttons, again
Peter Hutterer
peter.hutterer at who-t.net
Thu May 31 23:44:37 PDT 2012
On Thu, May 31, 2012 at 01:46:39PM +0200, Michal Suchanek wrote:
> From b824be59ebf7e9847e9e851eeb6e6c3d80c9a764 Mon Sep 17 00:00:00 2001
> From: Michal Suchanek <hramrach at gmail.com>
> Date: Wed, 23 May 2012 11:22:05 +0200
> Subject: [PATCH] Fix yet another crash in pointer event queuing.
>
> Signed-off-by: Michal Suchanek <hramrach at gmail.com>
> ---
> dix/getevents.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/dix/getevents.c b/dix/getevents.c
> index 9dc9617..6093799 100644
> --- a/dix/getevents.c
> +++ b/dix/getevents.c
> @@ -1574,7 +1574,7 @@ GetPointerEvents(InternalEvent *events, DeviceIntPtr pDev, int type,
> /* Now turn the smooth-scrolling axes back into emulated button presses
> * for legacy clients, based on the integer delta between before and now */
> for (i = 0; i < valuator_mask_size(&mask); i++) {
> - if (i >= pDev->valuator->numAxes)
> + if ( !pDev->valuator || (i >= pDev->valuator->numAxes))
> break;
>
> if (!valuator_mask_isset(&mask, i))
> --
> 1.7.10
sorry, forgot about this. merged now though I've taken the liberty of
changing the commit message.
"Fix crash for motion events from devices without valuators
A WarpPointer request may trigger a motion event on a device without
valuators. That request is ignored by GetPointerEvents but during
smooth scroll emulation we dereference dev->valuators to get the number
of axes.
Break out early if the device doesn't have valuators."
Cheers,
Peter
More information about the xorg-devel
mailing list