Commit faddfbec authored by Julien Cristau's avatar Julien Cristau Committed by Ulrich Sibiller

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: 's avatarGuillaume Quintin <coincoin169g@gmail.com> Signed-off-by: 's avatarJulien Cristau <jcristau@debian.org>
parent da678db0
......@@ -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)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment