summaryrefslogtreecommitdiff
path: root/pango/pango-engine.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2009-07-15 13:59:20 -0400
committerBehdad Esfahbod <behdad@behdad.org>2009-07-15 14:00:31 -0400
commit67052645e6afcd7f72ef852c99ee88897d2022da (patch)
tree90ae6efbad01f32febc2fea57c8b1dd1005a6fdc /pango/pango-engine.c
parent4d6f980b9f67e7e969e6f5afeb6f216c0a99e6f4 (diff)
downloadpango-67052645e6afcd7f72ef852c99ee88897d2022da.tar.gz
Handle NUL in text in places that g_utf8_strlen () was used
While pango-layout doesn't allow NUL in text, the lower level API should handle it correctly. We were using g_utf8_strlen() in a number of places. This is problematic since that function stops processing at NUL even if length>1. We now use an internal pango_utf8_strlen() instead. Inspired by: Bug 588678 – pango crash: install a new theme from gnome-appearance-properties
Diffstat (limited to 'pango/pango-engine.c')
-rw-r--r--pango/pango-engine.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pango/pango-engine.c b/pango/pango-engine.c
index 2891762a..974e2d5a 100644
--- a/pango/pango-engine.c
+++ b/pango/pango-engine.c
@@ -107,7 +107,7 @@ fallback_engine_shape (PangoEngineShape *engine G_GNUC_UNUSED,
int cluster = 0;
int i;
- n_chars = text ? g_utf8_strlen (text, length) : 0;
+ n_chars = text ? pango_utf8_strlen (text, length) : 0;
pango_glyph_string_set_size (glyphs, n_chars);