diff options
author | Tiago Vignatti <tiago.vignatti@nokia.com> | 2015-07-03 23:40:57 +0200 |
---|---|---|
committer | Mihai Moldovan <ionic@ionic.de> | 2015-07-04 01:27:55 +0200 |
commit | 44b913275b60fa4e95d76c2918426d7f7d70752a (patch) | |
tree | dd3b66a6ca6ef5f1bd2dd56afcf1a9ef501aff7a /debian/patches/1253_nx-X11_randr-check-for-virtual-size-limits-befo.full.patch | |
parent | 9b26cc1636da2039837be7b40b26715442554c94 (diff) | |
download | nx-libs-44b913275b60fa4e95d76c2918426d7f7d70752a.tar.gz nx-libs-44b913275b60fa4e95d76c2918426d7f7d70752a.tar.bz2 nx-libs-44b913275b60fa4e95d76c2918426d7f7d70752a.zip |
nx-X11: 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>
Backported from Arctica GH 3.6.x branch.
v2: backport to nx-libs 3.6.x (Ulrich Sibiller)
v3: backport to nx-libs 3.5.0.x (Mihai Moldovan)
Diffstat (limited to 'debian/patches/1253_nx-X11_randr-check-for-virtual-size-limits-befo.full.patch')
-rw-r--r-- | debian/patches/1253_nx-X11_randr-check-for-virtual-size-limits-befo.full.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/debian/patches/1253_nx-X11_randr-check-for-virtual-size-limits-befo.full.patch b/debian/patches/1253_nx-X11_randr-check-for-virtual-size-limits-befo.full.patch new file mode 100644 index 000000000..d89432cef --- /dev/null +++ b/debian/patches/1253_nx-X11_randr-check-for-virtual-size-limits-befo.full.patch @@ -0,0 +1,41 @@ +commit da678db0ef57c45f1bbe1c0e8f14da70746ed2cd +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Dec 17 16:09:35 2010 +0200 + + 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> + + Backported from Arctica GH 3.6.x branch. + + v2: backport to nx-libs 3.6.x (Ulrich Sibiller) + v3: backport to nx-libs 3.5.0.x (Mihai Moldovan) + +diff --git a/nx-X11/programs/Xserver/randr/rrscreen.c b/nx-X11/programs/Xserver/randr/rrscreen.c +index 9b3935e..9bea97b 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; |