aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/render/render.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-08-23 14:15:19 +0000
committermarha <marha@users.sourceforge.net>2010-08-23 14:15:19 +0000
commita219a0434f082a1d1faca472c14ba8c8e6d0fbc7 (patch)
tree41f0fddb8d4af0b7df7212e195d2b81df2c4acdf /xorg-server/render/render.c
parenta6913ef6cbee338f4f0001be4bde3960ce2cdf00 (diff)
parenta3f15e28f545a51f0a0139c38944ed324bafb94f (diff)
downloadvcxsrv-a219a0434f082a1d1faca472c14ba8c8e6d0fbc7.tar.gz
vcxsrv-a219a0434f082a1d1faca472c14ba8c8e6d0fbc7.tar.bz2
vcxsrv-a219a0434f082a1d1faca472c14ba8c8e6d0fbc7.zip
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/render/render.c')
-rw-r--r--xorg-server/render/render.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xorg-server/render/render.c b/xorg-server/render/render.c
index cbd70cc7e..623d5db33 100644
--- a/xorg-server/render/render.c
+++ b/xorg-server/render/render.c
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client)
gi = (xGlyphInfo *) (gids + nglyphs);
bits = (CARD8 *) (gi + nglyphs);
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)) {
+ err = BadLength;
+ goto bail;
+ }
+
for (i = 0; i < nglyphs; i++)
{
size_t padded_width;