diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ChangeLog.pre-1-10 | 5 | ||||
-rw-r--r-- | pango/pango-layout.c | 3 |
3 files changed, 12 insertions, 1 deletions
@@ -1,5 +1,10 @@ 2005-07-21 Owen Taylor <otaylor@redhat.com> + * pango/pango-layout.c (pango_layout_set_text): Avoid calling + memcpy with a NULL argument. (#310021, Morten Welinder) + +2005-07-21 Owen Taylor <otaylor@redhat.com> + Merges of fixes from Arabic module (#308813, Emil Soleyman-Zomalan) * modules/syriac/syriac-fc.c (syriac_engine_shape): Fix diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10 index 8e75a088..af1ea29d 100644 --- a/ChangeLog.pre-1-10 +++ b/ChangeLog.pre-1-10 @@ -1,5 +1,10 @@ 2005-07-21 Owen Taylor <otaylor@redhat.com> + * pango/pango-layout.c (pango_layout_set_text): Avoid calling + memcpy with a NULL argument. (#310021, Morten Welinder) + +2005-07-21 Owen Taylor <otaylor@redhat.com> + Merges of fixes from Arabic module (#308813, Emil Soleyman-Zomalan) * modules/syriac/syriac-fc.c (syriac_engine_shape): Fix diff --git a/pango/pango-layout.c b/pango/pango-layout.c index 9cfdeaa1..34bca4de 100644 --- a/pango/pango-layout.c +++ b/pango/pango-layout.c @@ -822,7 +822,8 @@ pango_layout_set_text (PangoLayout *layout, /* NULL-terminate the text for convenience. */ layout->text = g_malloc (length + 1); - memcpy (layout->text, text, length); + if (length > 0) + memcpy (layout->text, text, length); layout->text[length] = '\0'; layout->n_chars = g_utf8_strlen (layout->text, -1); |