On Tue, 19 Oct 2010 13:58:56 -0400, Adam Jackson <[email protected]> wrote:

> I read this as saying that comparison between void * is legal since they
> have compatible types, and does the expected thing as long as you
> haven't coerced the object across address spaces.

Seems ambiguous to me -- you can't do pointer arithmetic on void *
pointers (except in GCC). It's probably fine, but one worries about
non-GCC compilers (at least a little bit). How about:

ndex 00241f9..a14e9b0 100644
--- a/render/render.c
+++ b/render/render.c
@@ -1079,8 +1079,8 @@ ProcRenderAddGlyphs (ClientPtr client)
     remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs;
 
     /* protect against bad nglyphs */
-    if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) ||
-        bits < stuff || bits > ((CARD32 *)stuff + client->req_len)) {
+    if (gi < (xGlyphInfo *) stuff || gi > (xGlyphInfo *) ((CARD32 *)stuff + 
client->req_len) ||
+        bits < (CARD8 *) stuff || bits > (CARD8 *) ((CARD32 *)stuff + 
client->req_len)) {
         err = BadLength;
         goto bail;
     }


-- 
[email protected]

Attachment: pgpcx5wzspo9b.pgp
Description: PGP signature

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to