[PATCH 2/9] input: Fix possible crash in clip_pointer_motion

Kristian Høgsberg hoegsberg at gmail.com
Tue May 28 14:25:20 PDT 2013


On Tue, May 28, 2013 at 04:23:33PM +0200, alexl at redhat.com wrote:
> From: Alexander Larsson <alexl at redhat.com>
> 
> It was erronously using output->current->height in one
> place where it should use output->height. This may cause
> it to create an invalid clipped coordinate in case of output
> scaling or transform, because the next round "prev" would
> end up NULL.

This an remaining patches look good.  The policy change in case of
switching away from a DRIVER fullscreen buffer, is fine, it was always
a bit rough the way it worked before.

Kristian

> ---
>  src/input.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/input.c b/src/input.c
> index 129593f..89f74f4 100644
> --- a/src/input.c
> +++ b/src/input.c
> @@ -593,7 +593,7 @@ clip_pointer_motion(struct weston_seat *seat, wl_fixed_t *fx, wl_fixed_t *fy)
>  						prev->width - 1);
>  		if (y < prev->y)
>  			*fy = wl_fixed_from_int(prev->y);
> -		else if (y >= prev->y + prev->current->height)
> +		else if (y >= prev->y + prev->height)
>  			*fy = wl_fixed_from_int(prev->y +
>  						prev->height - 1);
>  	}
> -- 
> 1.8.1.4
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list