mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-28 02:21:08 +00:00
randr: switch to byte counting functions
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
7b9e84e320
commit
86b239ff9c
7 changed files with 24 additions and 24 deletions
|
|
@ -297,10 +297,10 @@ ProcRRCreateMode (ClientPtr client)
|
|||
|
||||
modeInfo = &stuff->modeInfo;
|
||||
name = (char *) (stuff + 1);
|
||||
units_after = (stuff->length - (sizeof (xRRCreateModeReq) >> 2));
|
||||
units_after = (stuff->length - bytes_to_int32(sizeof (xRRCreateModeReq)));
|
||||
|
||||
/* check to make sure requested name fits within the data provided */
|
||||
if ((int) (modeInfo->nameLength + 3) >> 2 > units_after)
|
||||
if (bytes_to_int32(modeInfo->nameLength) > units_after)
|
||||
return BadLength;
|
||||
|
||||
mode = RRModeCreateUser (pScreen, modeInfo, name, &error);
|
||||
|
|
|
|||
Loading…
Reference in a new issue