summaryrefslogtreecommitdiff
path: root/randr/rrmode.c
diff options
context:
space:
mode:
Diffstat (limited to 'randr/rrmode.c')
-rw-r--r--randr/rrmode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/randr/rrmode.c b/randr/rrmode.c
index 2a1007662..3d053bc66 100644
--- a/randr/rrmode.c
+++ b/randr/rrmode.c
@@ -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);