[PATCH xserver] animcur: Fix crash when removing a master device

Peter Hutterer peter.hutterer at who-t.net
Mon Apr 23 22:29:55 UTC 2018


On Mon, Apr 23, 2018 at 03:21:14PM -0400, Adam Jackson wrote:
> Reproducer:
> 
> $ Xvfb -ac -noreset :1 &
> $ DISPLAY=:1 xinput create-master touch1
> $ DISPLAY=:1 xinput remove-master "touch1 pointer"
> 
> Bugzilla: https://bugs.freedesktop.org/105761
> Signed-off-by: Adam Jackson <ajax at redhat.com>

Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>

Cheers,
   Peter

> ---
>  render/animcur.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/render/animcur.c b/render/animcur.c
> index 65327df655..ef27bda278 100644
> --- a/render/animcur.c
> +++ b/render/animcur.c
> @@ -155,7 +155,8 @@ AnimCurTimerNotify(OsTimerPtr timer, CARD32 now, void *arg)
>  static void
>  AnimCurCancelTimer(DeviceIntPtr pDev)
>  {
> -    CursorPtr cur = pDev->spriteInfo->sprite->current;
> +    CursorPtr cur = pDev->spriteInfo->sprite ?
> +                    pDev->spriteInfo->sprite->current : NULL;
>  
>      if (IsAnimCur(cur))
>          TimerCancel(GetAnimCur(cur)->timer);
> -- 
> 2.17.0
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel
> 


More information about the xorg-devel mailing list