[PATCH] Bugfix for "Pre-validate ChangeGC XIDs": off-by-one in loop index.
Jamey Sharp
jamey at minilop.net
Fri May 14 00:20:43 PDT 2010
Signed-off-by: Jamey Sharp <jamey at minilop.net>
---
Well, that's thoroughly embarrassing. Does this fix the regression for
you, Jeremy?
dix/gc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dix/gc.c b/dix/gc.c
index 00b63bd..5a0d00d 100644
--- a/dix/gc.c
+++ b/dix/gc.c
@@ -439,7 +439,7 @@ ChangeGCXIDs(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32)
client->errorValue = mask;
return BadValue;
}
- for (i = Ones(mask); i; --i)
+ for (i = Ones(mask); i--; )
vals[i].val = pC32[i];
for (i = 0; i < sizeof(xidfields) / sizeof(*xidfields); ++i)
{
--
1.7.0
More information about the xorg-devel
mailing list