From 86b239ff9c4d01685c357ca2b1ef761d167e3224 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 6 Jul 2009 12:24:27 +1000 Subject: randr: switch to byte counting functions Signed-off-by: Peter Hutterer --- randr/rrmode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'randr/rrmode.c') 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); -- cgit v1.2.3