[PATCH 2/9] input: Fix possible crash in clip_pointer_motion
alexl at redhat.com
alexl at redhat.com
Tue May 28 07:23:33 PDT 2013
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.
---
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
More information about the wayland-devel
mailing list