diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2007-07-31 18:06:16 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2007-07-31 18:06:16 +0000 |
commit | 5080d0c30ff4bbf9c69be95bcb67764ea1fdc8a3 (patch) | |
tree | ea8705da653bd59840fc109182fda6a794f875cf /pango/break.c | |
parent | e842479843f4262e9d8497d7f48cbbd1415e4370 (diff) | |
download | pango-5080d0c30ff4bbf9c69be95bcb67764ea1fdc8a3.tar.gz |
Bug 462137 – memory corruption in pango_default_break
2007-07-31 Behdad Esfahbod <behdad@gnome.org>
Bug 462137 – memory corruption in pango_default_break
* pango/break.c (pango_default_break): Handle the case of
an empty string correctly.
svn path=/trunk/; revision=2385
Diffstat (limited to 'pango/break.c')
-rw-r--r-- | pango/break.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pango/break.c b/pango/break.c index 091d2541..2ab71efe 100644 --- a/pango/break.c +++ b/pango/break.c @@ -558,7 +558,10 @@ pango_default_break (const gchar *text, prev_jamo = NO_JAMO; if (length == 0 || *text == '\0') - next_wc = PARAGRAPH_SEPARATOR; + { + next_wc = PARAGRAPH_SEPARATOR; + almost_done = TRUE; + } else next_wc = g_utf8_get_char (next); |