xserver: Branch 'master'

Keith Packard keithp at kemper.freedesktop.org
Mon Dec 20 00:47:10 PST 2010


 randr/rrscreen.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)

New commits:
commit d1107918d4626268803b54033a07405122278e7f
Author: Tiago Vignatti <tiago.vignatti at nokia.com>
Date:   Fri Dec 17 16:09:35 2010 +0200

    randr: check for virtual size limits before set crtc
    
    Return a error if the screen is configured to an invalid size.
    
    Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
    Reviewed-by: Adam Jackson <ajax at redhat.com>
    Reviewed-by: Daniel Stone <daniel at fooishbar.org>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/randr/rrscreen.c b/randr/rrscreen.c
index 292163f..0efc62e 100644
--- a/randr/rrscreen.c
+++ b/randr/rrscreen.c
@@ -939,6 +939,18 @@ ProcRRSetScreenConfig (ClientPtr client)
 	width = mode->mode.height;
 	height = mode->mode.width;
     }
+
+    if (width < pScrPriv->minWidth || pScrPriv->maxWidth < width) {
+	client->errorValue = width;
+	free(pData);
+	return BadValue;
+    }
+    if (height < pScrPriv->minHeight || pScrPriv->maxHeight < height) {
+	client->errorValue = height;
+	free(pData);
+	return BadValue;
+    }
+
     if (width != pScreen->width || height != pScreen->height)
     {
 	int	c;


More information about the xorg-commit mailing list