aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver
diff options
context:
space:
mode:
authorTiago Vignatti <tiago.vignatti@nokia.com>2010-12-17 16:09:35 +0200
committerUlrich Sibiller <uli42@gmx.de>2015-06-07 00:08:48 +0200
commitda678db0ef57c45f1bbe1c0e8f14da70746ed2cd (patch)
treedad928204faafc88ce4031c8325a6691c67816ed /nx-X11/programs/Xserver
parent2aeb7671963932d5ddb771ad641969e20bb9aa25 (diff)
downloadnx-libs-da678db0ef57c45f1bbe1c0e8f14da70746ed2cd.tar.gz
nx-libs-da678db0ef57c45f1bbe1c0e8f14da70746ed2cd.tar.bz2
nx-libs-da678db0ef57c45f1bbe1c0e8f14da70746ed2cd.zip
Backport: 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@nokia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'nx-X11/programs/Xserver')
-rw-r--r--nx-X11/programs/Xserver/randr/rrscreen.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/randr/rrscreen.c b/nx-X11/programs/Xserver/randr/rrscreen.c
index 9b3935e03..9bea97b9f 100644
--- a/nx-X11/programs/Xserver/randr/rrscreen.c
+++ b/nx-X11/programs/Xserver/randr/rrscreen.c
@@ -938,6 +938,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;