diff options
author | Jim Grandy <jgrandy@authentic8.com> | 2013-07-06 08:50:12 -0700 |
---|---|---|
committer | Jim Grandy <jgrandy@authentic8.com> | 2013-08-22 12:52:32 -0700 |
commit | 3cb0bc7ae8a638c22316135ca0ddbaeace2275de (patch) | |
tree | 91e88a43755d76800e2f25178e57f28872bbb546 /xorg/X11R7.6/rdp | |
parent | 142a93829b3224550fe27c3c5d60d255f3a6424d (diff) | |
download | xrdp-proprietary-3cb0bc7ae8a638c22316135ca0ddbaeace2275de.tar.gz xrdp-proprietary-3cb0bc7ae8a638c22316135ca0ddbaeace2275de.zip |
Hand-apply patches (X11rdp text) from Authentic8: d25c23d f977cd9
Diffstat (limited to 'xorg/X11R7.6/rdp')
-rw-r--r-- | xorg/X11R7.6/rdp/rdpdraw.c | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/xorg/X11R7.6/rdp/rdpdraw.c b/xorg/X11R7.6/rdp/rdpdraw.c index 27ccb02d..dec945ee 100644 --- a/xorg/X11R7.6/rdp/rdpdraw.c +++ b/xorg/X11R7.6/rdp/rdpdraw.c @@ -780,7 +780,8 @@ draw_item_pack(PixmapPtr pix, rdpPixmapRec *priv) } else { - if (region_in_region(di->reg, -1, di_prev->reg)) + if ((di->type == RDI_TEXT) && + region_interect_at_all(di->reg, di_prev->reg)) { break; } @@ -1746,6 +1747,32 @@ rdpComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, } /******************************************************************************/ +/* make sure no glyph is too big */ +/* returns boolean */ +static int +rdpGlyphCheck(int nlist, GlyphListPtr list, GlyphPtr* glyphs) +{ + int n; + GlyphPtr glyph; + + while (nlist--) + { + n = list->len; + list++; + while (n--) + { + glyph = *glyphs++; + if ((glyph->info.width * glyph->info.height) > 8192) + { + LLOGLN(10, ("rdpGlyphCheck: too big")); + return 0; + } + } + } + return 1; +} + +/******************************************************************************/ void rdpGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, @@ -1756,7 +1783,7 @@ rdpGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, LLOGLN(10, ("rdpGlyphs: op %d xSrc %d ySrc %d maskFormat %p", op, xSrc, ySrc, maskFormat)); - if (g_do_glyph_cache) + if (g_do_glyph_cache && rdpGlyphCheck(nlists, lists, glyphs)) { g_doing_font = 2; ps = GetPictureScreen(g_pScreen); |