Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > e265b08b6bebf8514a189c80db57a2d3 > files > 21

x11-server-1.3.0.0-25.1mdv2008.0.src.rpm

From 3efa7fa2994bf2e61ddc964ad12c9f4e9fd03cf5 Mon Sep 17 00:00:00 2001
From: Keith Packard <keithp@neko.keithp.com>
Date: Sat, 14 Jul 2007 08:47:50 -0700
Subject: [PATCH] Screen size bounds check in ProcRRSetCrtcConfig not masking out reflections.

When checking how to validate the selected mode and position against the
current screen size, the test against 90/270 rotation did not mask out
reflection, so that when reflection was specified, the 90/270 test would
never succeed. This caused incorrect bounds checking and would return
an error to the user instead of rotating the screen.
---
 randr/rrcrtc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
index 9adafa2..0ab8e55 100644
--- a/randr/rrcrtc.c
+++ b/randr/rrcrtc.c
@@ -796,7 +796,7 @@ ProcRRSetCrtcConfig (ClientPtr client)
 	    int source_width = mode->mode.width;
 	    int	source_height = mode->mode.height;
 
-	    if (rotation == RR_Rotate_90 || rotation == RR_Rotate_270)
+	    if ((rotation & 0xf) == RR_Rotate_90 || (rotation & 0xf) == RR_Rotate_270)
 	    {
 		source_width = mode->mode.height;
 		source_height = mode->mode.width;
-- 
1.5.2.4