diff options
author | Julien Cristau <jcristau@debian.org> | 2015-07-03 23:53:25 +0200 |
---|---|---|
committer | Mihai Moldovan <ionic@ionic.de> | 2015-07-04 01:28:17 +0200 |
commit | 09cb7b2d2aa35c6353202e57867f1970df9f5ec2 (patch) | |
tree | fb58f4f3cea4757cef106785c49e6917a5cb63ad /debian/patches/1254_nx-X11_randr-fix-server-crash-in-RRGetScreenInf.full.patch | |
parent | 44b913275b60fa4e95d76c2918426d7f7d70752a (diff) | |
download | nx-libs-09cb7b2d2aa35c6353202e57867f1970df9f5ec2.tar.gz nx-libs-09cb7b2d2aa35c6353202e57867f1970df9f5ec2.tar.bz2 nx-libs-09cb7b2d2aa35c6353202e57867f1970df9f5ec2.zip |
nx-X11: Backport: randr: fix server crash in RRGetScreenInfo
We don't return rates to randr < 1.1 clients, so don't allocate space
for them. This fixes a FatalError due to not all allocated space being
used.
X.Org bug#21861 <http://bugs.freedesktop.org/show_bug.cgi?id=21861>
Reported-by: Guillaume Quintin <coincoin169g@gmail.com>
Signed-off-by: Julien Cristau <jcristau@debian.org>
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/1254_nx-X11_randr-fix-server-crash-in-RRGetScreenInf.full.patch')
-rw-r--r-- | debian/patches/1254_nx-X11_randr-fix-server-crash-in-RRGetScreenInf.full.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/debian/patches/1254_nx-X11_randr-fix-server-crash-in-RRGetScreenInf.full.patch b/debian/patches/1254_nx-X11_randr-fix-server-crash-in-RRGetScreenInf.full.patch new file mode 100644 index 000000000..cab084ddd --- /dev/null +++ b/debian/patches/1254_nx-X11_randr-fix-server-crash-in-RRGetScreenInf.full.patch @@ -0,0 +1,36 @@ +commit faddfbec6ff331c3859e2f57040da4a8cf072baa +Author: Julien Cristau <jcristau@debian.org> +Date: Fri May 22 09:54:38 2009 +0200 + + Backport: randr: fix server crash in RRGetScreenInfo + + We don't return rates to randr < 1.1 clients, so don't allocate space + for them. This fixes a FatalError due to not all allocated space being + used. + + X.Org bug#21861 <http://bugs.freedesktop.org/show_bug.cgi?id=21861> + + Reported-by: Guillaume Quintin <coincoin169g@gmail.com> + Signed-off-by: Julien Cristau <jcristau@debian.org> + + 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 9bea97b..20eed11 100644 +--- a/nx-X11/programs/Xserver/randr/rrscreen.c ++++ b/nx-X11/programs/Xserver/randr/rrscreen.c +@@ -677,8 +677,9 @@ ProcRRGetScreenInfo (ClientPtr client) + rep.sizeID = pData->size; + rep.rate = pData->refresh; + +- extraLen = (rep.nSizes * sizeof (xScreenSizes) + +- rep.nrateEnts * sizeof (CARD16)); ++ extraLen = rep.nSizes * sizeof (xScreenSizes); ++ if (has_rate) ++ extraLen += rep.nrateEnts * sizeof (CARD16); + + if (extraLen) + { |