Hi,
Request length calculation inside XRenderCompositeText32 is broken for
the case where the number of glyphs fits exactky inside the last
xGlyphElt.
In XRenderCompositeText8 and XRenderCompositeText16 this case is
handled properly, somehow the "-1" got missing in
XRenderCompositeText32.
src/Glyph.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Glyph.c b/src/Glyph.c
index dbeb77e..48e40c3 100644
--- a/src/Glyph.c
+++ b/src/Glyph.c
@@ -665,7 +665,7 @@ XRenderCompositeText32 (Display *dpy,
len += (SIZEOF (xGlyphElt) + 4) >> 2;
}
nchars = elts[i].nchars;
- elen = SIZEOF(xGlyphElt) * ((nchars + MAX_32) / MAX_32) + nchars *4;
+ elen = SIZEOF(xGlyphElt) * ((nchars + MAX_32-1) / MAX_32) + nchars *4;
len += (elen + 3) >> 2;
}
Regards, Clemens
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel