summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-06-09 09:59:36 +0100
committerOwain G. Ainsworth <oga@openbsd.org>2010-06-10 21:08:18 +0100
commit38eb2bdd72aaf2045508b59b672464f9746ab5eb (patch)
tree2da1afe3a0c398d481761500e4280a7dd79e8652
parent9f4a244a363167dc62fa454af197ca8ba6a5e434 (diff)
uxa: Handle all-clipped out case with destination glyphs.
Fixes the crash reported in: Bug 28446 - Garbled Font with Mathematica 7 https://bugs.freedesktop.org/show_bug.cgi?id=28446 pDst=0x3d663c0, src_x=0, src_y=0, xDst=142, yDst=112, nlist=0, list=0x7fffea026580, glyphs=0x7fffea025d88, extents=0x0) at uxa-glyphs.c:809 dx = 0 y1 = 101 x2 = 150 x1 = 142 dy = 0 y2 = 112 rects = 0x5491000 this_atlas = 0x2456d00 mask_y = 128 glyph = 0x35933a0 mask_x = 736 priv = 0x39309e0 screen = 0x8d2cc0 uxa_screen = 0x2443eb0 src_pixmap = 0x37c29e0 dst_pixmap = 0x45ddbf0 localSrc = 0x361a450 glyph_atlas = 0x2456d00 x = 142 y = 112 n = 18 nrect = -9975128 box = {x1 = 23152, y1 = -5630, x2 = 32767, y2 = 0} __PRETTY_FUNCTION__ = "uxa_glyphs_to_dst" Though the meat of that bug regarding the incorrect remains unsolved. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 994aa1ef571ac2ab05f6588f9068d33b536c7a37) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
-rw-r--r--uxa/uxa-glyphs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/uxa/uxa-glyphs.c b/uxa/uxa-glyphs.c
index 63a0270b..8d44090c 100644
--- a/uxa/uxa-glyphs.c
+++ b/uxa/uxa-glyphs.c
@@ -800,7 +800,7 @@ uxa_glyphs_to_dst(CARD8 op,
glyph->info.height);
} else {
BoxPtr rects = REGION_RECTS(pDst->pCompositeClip);
- do {
+ while (nrect--) {
int x1 = x - glyph->info.x, dx = 0;
int y1 = y - glyph->info.y, dy = 0;
int x2 = x1 + glyph->info.width;
@@ -823,7 +823,7 @@ uxa_glyphs_to_dst(CARD8 op,
x2 - x1, y2 - y1);
}
rects++;
- } while (--nrect);
+ }
}
next_glyph: