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>
This commit is contained in:
parent
c70511931c
commit
12e725d08b
|
@ -664,8 +664,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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue