Xi: fix copy/paste error causing sizeof against wrong struct.

This wrong check may cause BadLength to be returned to the client even if the
length is correct.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2009-05-06 22:25:28 +10:00
parent fc0013d744
commit f6f1e41706

View File

@ -747,7 +747,7 @@ ProcXChangeDeviceProperty (ClientPtr client)
return BadValue;
}
len = stuff->nUnits;
if (len > ((0xffffffff - sizeof(xChangePropertyReq)) >> 2))
if (len > ((0xffffffff - sizeof(xChangeDevicePropertyReq)) >> 2))
return BadLength;
sizeInBytes = format>>3;
totalSize = len * sizeInBytes;