summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2007-07-31 18:06:43 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2007-07-31 18:06:43 +0000
commit074ae3638a47b294fb94b4c44088e3582d722196 (patch)
tree2dd27d7e73843b6eb3eceb2b29348d9647997eb9
parentacabcb969481aeb0481d7f824076fd0ea2fb9273 (diff)
downloadpango-1-16.tar.gz
Bug 462137 – memory corruption in pango_default_breakpango-1-16
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=/branches/pango-1-16/; revision=2386
-rw-r--r--ChangeLog7
-rw-r--r--pango/break.c8
2 files changed, 11 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index ea4b1abe..fb4d1a3a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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.
+
2007-07-27 Behdad Esfahbod <behdad@gnome.org>
* === Released 1.16.5 ===
diff --git a/pango/break.c b/pango/break.c
index 091d2541..da8209f0 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);
@@ -627,9 +630,6 @@ pango_default_break (const gchar *text,
*/
attrs[i].is_white = g_unichar_isspace (wc);
- /* Just few spaces have variable width. So explicitly mark them.
- */
- attrs[i].is_expandable_space = (0x0020 == wc || 0x00A0 == wc);
/* ---- Cursor position breaks (Grapheme breaks) ---- */