-
Alan Coopersmith authored
XRRGetCrtcGamma() returns the exact same size information as XRRGetCrtcGammaSize(), so just use it instead of waiting for the X server to send it an extra time. (And if something has gone very wrong so that they aren't the same, this avoids out-of-bounds reads processing the returned gamma arrays by using the size of the arrays we allocated.) Reported-by: Gregory James DUCK <gjduck@gmail.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>