summaryrefslogtreecommitdiff
path: root/randr/rrmode.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-07-06 12:24:27 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-07-14 10:14:01 +1000
commit86b239ff9c4d01685c357ca2b1ef761d167e3224 (patch)
tree59ee2462a0132037df8d634644c7c866f98a4266 /randr/rrmode.c
parent7b9e84e320a6f6449fe7bc58a8d6a094ae37b86c (diff)
randr: switch to byte counting functions
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
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);