aboutsummaryrefslogtreecommitdiff
path: root/libXft/src
diff options
context:
space:
mode:
Diffstat (limited to 'libXft/src')
-rw-r--r--libXft/src/xftcore.c10
-rw-r--r--libXft/src/xftdpy.c2
-rw-r--r--libXft/src/xftdraw.c2
3 files changed, 12 insertions, 2 deletions
diff --git a/libXft/src/xftcore.c b/libXft/src/xftcore.c
index 3f8710929..a0103cf26 100644
--- a/libXft/src/xftcore.c
+++ b/libXft/src/xftcore.c
@@ -1253,7 +1253,17 @@ XftGlyphFontSpecCore (XftDraw *draw,
if (i)
{
if (g_x1 < x1)
+ {
+ if (g_x1 < 0)
+ {
+ /* do nothing if the given glyphs are out of range */
+ short t = glyphs[i-1].font->max_advance_width
+ + glyphs[i-1].x;
+ if (t < 0 && glyphs[i-1].x > 0)
+ goto bail1;
+ }
x1 = g_x1;
+ }
if (g_y1 < y1)
y1 = g_y1;
if (g_x2 > x2)
diff --git a/libXft/src/xftdpy.c b/libXft/src/xftdpy.c
index 055351586..cd50358d2 100644
--- a/libXft/src/xftdpy.c
+++ b/libXft/src/xftdpy.c
@@ -160,7 +160,7 @@ _XftDisplayInfoGet (Display *dpy, FcBool createIfNecessary)
info->next = _XftDisplayInfo;
_XftDisplayInfo = info;
- info->glyph_memory = NULL;
+ info->glyph_memory = 0;
info->max_glyph_memory = XftDefaultGetInteger (dpy,
XFT_MAX_GLYPH_MEMORY, 0,
XFT_DPY_MAX_GLYPH_MEMORY);
diff --git a/libXft/src/xftdraw.c b/libXft/src/xftdraw.c
index ab5174973..21f8538a3 100644
--- a/libXft/src/xftdraw.c
+++ b/libXft/src/xftdraw.c
@@ -301,7 +301,7 @@ XftDrawSrcPicture (XftDraw *draw, _Xconst XftColor *color)
int i;
XftColor bitmapColor;
- if (!info)
+ if (!info || !info->solidFormat)
return 0;
/*