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:
parent
fc0013d744
commit
f6f1e41706
|
@ -747,7 +747,7 @@ ProcXChangeDeviceProperty (ClientPtr client)
|
||||||
return BadValue;
|
return BadValue;
|
||||||
}
|
}
|
||||||
len = stuff->nUnits;
|
len = stuff->nUnits;
|
||||||
if (len > ((0xffffffff - sizeof(xChangePropertyReq)) >> 2))
|
if (len > ((0xffffffff - sizeof(xChangeDevicePropertyReq)) >> 2))
|
||||||
return BadLength;
|
return BadLength;
|
||||||
sizeInBytes = format>>3;
|
sizeInBytes = format>>3;
|
||||||
totalSize = len * sizeInBytes;
|
totalSize = len * sizeInBytes;
|
||||||
|
|
Loading…
Reference in New Issue