summaryrefslogtreecommitdiff
path: root/xserver/randr
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2011-04-02 16:08:42 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2011-04-02 16:08:42 +0000
commit45d2cfad3bb2ac4246dc1863e5b8689d6bb34fa8 (patch)
tree8cf9735d4bf7b17b11cb2b5f9d56b797d20c438d /xserver/randr
parent68fd41f12f9344d45b8a897e368548c7dcb0d366 (diff)
Update to xserver 1.9.5. Tested by jasper@, ajacoutot@ and krw@
Diffstat (limited to 'xserver/randr')
-rw-r--r--xserver/randr/rrscreen.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/xserver/randr/rrscreen.c b/xserver/randr/rrscreen.c
index f58e6578a..1bc1a9ea1 100644
--- a/xserver/randr/rrscreen.c
+++ b/xserver/randr/rrscreen.c
@@ -915,6 +915,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;