summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorClemens Eisserer <linuxhippy@gmail.com>2013-11-23 22:15:52 -0800
committerKeith Packard <keithp@keithp.com>2013-11-23 22:15:52 -0800
commit7887382e59b7a06d6b02501205d543fdf76c8249 (patch)
treecb4b7ef41aceaeb8785dc5f1438edcb60822b7be /src
parent2222b0fbff96b9f0324bb1e2f56416c84be23c3b (diff)
downloadxorg-lib-libXrender-7887382e59b7a06d6b02501205d543fdf76c8249.tar.gz
Fix request length calculation for XRenderCompositeText32
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. Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r--src/Glyph.c2
1 files changed, 1 insertions, 1 deletions
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;
}