Hi
        In clutter_text_set_text_internal, when text length in character is 
greater than max_length, the new text string buffer is not malloced with right 
length.

        Here is my patch:

diff --git a/clutter/clutter-text.c b/clutter/clutter-text.c
index 7e911d6..4e8e38a 100644
--- a/clutter/clutter-text.c
+++ b/clutter/clutter-text.c
@@ -2810,7 +2810,8 @@ clutter_text_set_text_internal (ClutterText *self,
         }
       else
         {
-          gchar *n = g_malloc0 (priv->max_length + 1);
+          gchar *p = g_utf8_offset_to_pointer (text, priv->max_length);
+          gchar *n = g_malloc0 ((p - text) + 1);
 
           g_free (priv->text);


Best Regards,
Raymond Liu
--
To unsubscribe send a mail to clutter+unsubscr...@o-hand.com

Reply via email to