Handle NUL in text in places that g_utf8_strlen () was used
authorBehdad Esfahbod <behdad@behdad.org>
Wed, 15 Jul 2009 17:59:20 +0000 (13:59 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Wed, 15 Jul 2009 18:00:31 +0000 (14:00 -0400)
commit67052645e6afcd7f72ef852c99ee88897d2022da
tree90ae6efbad01f32febc2fea57c8b1dd1005a6fdc
parent4d6f980b9f67e7e969e6f5afeb6f216c0a99e6f4
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
pango/break.c
pango/ellipsize.c
pango/glyphstring.c
pango/pango-engine.c
pango/pango-glyph-item.c
pango/pango-impl-utils.h
pango/pango-layout.c